I have scoured the Internet and tried a billion different VLOOKUP formulas and Visual Basic marcos to no avail on this one.
I have 4 columns of letters and numbers (identifiers). Some of the identifiers are duplicated in the 4 columns. I need to line up the data in the columns so that I can see which identifiers are in multiple columns. There are some identifiers in each column that are not in any other columns (each column had a different number of entries, so the identifiers do not currently line up).
I want it to look something like this (minus the ...s):
Column A..............Column B...........Column C..............Column D
R101...............................................R101........................
R102.........................R102................................
R103.................................................................................R103
R104........................R104.................R104.........................
.................................R105.........................
There are a couple of additional columns of data associated with Column A that need to remain tied to the identifier they correspond to in Column A (so the data in Column E and F should stay tied to the item the correspond to in column A). The identifiers in Columns B, C, and D can move about however they need to to line up with their matches in A. Honestly, all I really care about is whether values in B, C, and D are also in A. I'm happy to use a macro. The identifiers in Columns B, C, and D are also avaialble in other sheets of the same workbook -- I moved them into the same sheet as Column A because I thought it would be easier to make this work... but I could be wrong!
Can someone help me with this? Very explicit copy-paste type instructions are appreciated! I currently have the data organized into adjacent columns A, B, C, and D.
I am not very sure I have understood your question , but suppose your data in column A ranges from say A2 through A10.
In column B , starting from cell B2 , put in the formula :
=IF(ISNA(MATCH($A2,B$2:B$10,0)),"",$A2)
Copy this down till B10 ; copy the formulae in B2:B10 to columns C and D.
What this does is where there are matches in columns B , C and D for data in column A , the entries will be displayed , otherwise the cells in columns B , C and D will be blank.
Related
I apologize if this question has been asked before, but I have searched and cannot locate it.
Each cell in column B contains a specific (but not necessarily unique) value for each value in Column A. Column C contains all Column A cell data, but also contains additional data cells. I am attempting to create a new Column (D) for the Column B values to correspond with the Column A/B relationship. There will obviously be blank cells in Column D (for the rows where Column C contains data not located in Column A), but this is not an issue for me in this situation. Essentially, I want the A/B relationships to all be reflected in Columns C/D with blanks in the D rows where C has data not located in A.
Any help would be GREATLY appreciated.
In cell D1, do :
=iferror(index(b:b, match(c1, a:a, 0)),"")
Then drag downwards.
Idea/reference : I use index match function (a web search will explain it much better) to retrieve the column b value n fill it in column d. And put a blank "" if no match found. Pls share if it works/not.
enter image description here
I need to do this in excel and I do know how to do this with python etc, but it has to be done in excel either VBA or formula (best option).
Column A, contains a "W" character.
Column B, contains a "abc" cell that will be the same everywhere (The other rows won't be the same).
Column C, I am concatenating all cells in column B before column A hits a "W" value.
I want to achieve some sort of a formula in a single or multiple steps that will allow me to concatenate all B column rows until column A has a "W". The concatenation must happen in same row as "abc" in column B, but paste on column C.
Thank you in advance
If you can use column D (as an intermediate step) as well as C, set C2 to
=IF(A2="W",D2,"")
and set D2 to
=B2&IF(A3="W","",";;"&D3)
then copy column C and D down as far as necessary.
I would like to compare three separate columns in an excel spreadsheet, across thousands of rows.
If any value appears in column A multiple times (say the word hello in column A rows 1 and 4, and the word bye in column A and rows 3 & 5, I would like to check the corresponding values in column B for those rows (ie rows 1&4 and 3&5).
If the values in column B for rows 1&4 are say 15 & 15, and the values for rows 3&5 are 20 & 20 , then I want to check column C.
Now we know rows 1&4 and 3&5 have the same corresponding values in column A & B, I would like to check the corresponding values in column C. If these are different then I would like to perform a specific calculation. If they are the same values in Column C, then I want to ignore these rows.
I am sorry this is very unclear, as I cannot paste an image to show what I mean. I can email you an example if it helps.
This is way beyond me and my excel skills and I do not know where to start. Any help would be appreciated. I am hoping I don't need to write a Macro.
Thanks in advance!
So, to resummarize your question as I understand it:
Column A holds string values (text). There are some duplicates here.
Column B holds number values. When a duplicate occurs in column A, the data in column B may or may not be identical as for the other duplicate entries.
Column C holds values (you did not define what type of values, but I assume these are number values). Sometimes, duplicates in column A hold the same values in column B, and also the same values in column C. In this case, we can ignore the row as all the duplicates agree. Sometimes, duplicates in column A hold different values in column B. In this case, we can also ignore the values. Finally, sometimes duplicates in column A hold the same values in column B, but different values in column C. For these specific values, we want to perform some other type of calculation (which you did not specify).
Put the following in column D, starting at row 2 (assuming a header on row 1), which is the starting point of the formula we will build.
=IFERROR(VLOOKUP(A$1:B1,A2,2,0)=B2,"")
This says: Look at column A, starting always at row 1, and going until 1 row above the current row. Check for a match of the text in the current row. If it finds a match there, pull the result from column B. Does that result match column B in the current row? If it matches it will say TRUE; if it doesnt match it will say FALSE. If there are no duplicates yet in column A it will say "".
Now add a new check - if the above formula is TRUE [ie: there is a duplicate in column A, and the result in column B matches], then we want to check the results from column C:
=IFERROR(IF(VLOOKUP(A$1:B1,A2,2,0)=B2,VLOOKUP(A$1:C1,A2,3,0)=C2,""),"")
This will now return TRUE if the values in column C match for that duplicate in column A (which is only checked if the values in column B match too). Finally, add in your "special calculation", like so:
=IFERROR(IF(VLOOKUP(A$1:B1,A2,2,0)=B2,IF(VLOOKUP(A$1:C1,A2,3,0)=C2,"",C2+1),""),"")
Where I have C2+1, this is where you will perform your special calculation. This will only be recorded by Excel if: there is a duplicate in column A, that duplicate has a matching value in column B, and that duplicate has an unmatched value in column C.
I'm trying to transfer values with macro in Excel for my upcoming billiards tournament playoff table. For example let's say I have column A with names {A1,A2,A3,A4} and every name is on a different row. Then I have column B in the same sheet with according values {1,4,3,2}. Now I have another sheet which has column I (and previous column H of course) and that column I has values from 1-16. I'd like to match numbers between columns I and B and place names to the previous column (column H).
To visualize this idea (keep in mind that every element is on its own row):
Column A, sheet #1: {A1,A2,A3,A4}
Column B, sheet #1: {1,4,3,2}
Column I, sheet #2: {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}
Column H, sheet #2: {}
Column H should get values from column A, other rows (which numbers are not in column B) will be left empty.
I've never done VBA before. I know coding in Java and Python but VBA is not really my thing. I'd like to see if anyone could point me in the right direction or maybe should even solve this issue.
I think what you want, is:
Turn on Record Macro:
In H1 enter:
=IFERROR(INDEX('Sheet #1'!A:A,MATCH(I1,'Sheet #1'!B:B,0)),"")
and copy down to suit.
I have two columns in excel with column A is a numbers and column B is a duplicate of various texts.
I need a way to copy the column A to column C if column B is duplicate?
If you are simply trying to indicate duplicates, would this work for your case (formula goes in C2)?
=IF(COUNTIF(B:B,B2)>1,A2,"")
Work on a copy, with data headers assumed to be in row 1.
Sort data by column B.
In C2, type =IF(B2=B1,A1,"")
and copy down the sheet.
Then, if there's a duplicate, it will appear in column C