I have a sheet like below:
columnA columnB columnC columnD columnE
10001 aaa bbb 10004
10002 mmm nnn 10006
10003 yyy zzz 10009
10004 uuu xxx 10010
10005 fff ggg
10007 kkk hhh
10009 rrr ppp
columnA, columnB and columnC have around 60k rows, and columnE has around 800 rows which have the same value scope of columnA.
I want to figure out the rows for the first 3 columns which columnA has a value exists in columnE.
According to this post, I have tried to use the formula in columnD
=IF(ISNA(VLOOKUP(A2,$E$2:$E$800,1,FALSE)),"No","Yes") but Excel always popup a window saying:
The formula you typed contains an error
I am not familiar with using function in Excel, can anyone help to give a clue where the error is? I am using Excel 2007
It works for me:
However I have a few things you can try to debug:
If you have downladed or exported this data then be sure the file format is not .xls and the file hasn't opened in [compatability] mode as this will restrict the number of rows allowed. I doubt this is the issue.
Try and create you formula in stages to see which of the steps fail, e.g.:
=VLOOKUP(A2,$E$2:$E$800,1,FALSE) should give the the number e.g. 10004 or #N/A
=ISNA(VLOOKUP(A2,$E$2:$E$800,1,FALSE)) should give you TRUE or FALSE
=IF(ISNA(VLOOKUP(A2,$E$2:$E$800,1,FALSE)),"No","Yes") should give you Yes or No
Related
Hard to explain and english is not my native language, but i'll do my best. I have a cell with a CONCATENATE formula which creates a "code" value to identify different articles. The CONCATENATE formula is getting the values from 6 different cells. I need the 6th cell to sum +1 if the value of the other 5 cells already exist.
For example:
1
AAA
2
BBB
3
CCC
4
DDD
5
EEE
6
NNN (where NNN is a specific 3 characters number)
CONCATENATE creates the AAABBBCCCDDDEEENNN code. For the first article, it will be AAABBBCCCDDDEEE001. Then, if I create another article with AAABBBCCCDDDEEE, I want to 6th cell to fill up with 002, since 001 already exists.
Is that possible?
Thanks in advance.
If you enter '001 for the first cell in your 6th column, you can use this formula in the cell below it and copy it for all the cells below.
=IF(CONCATENATE(B2,C2,D2,E2,F2)=CONCATENATE(B1,C1,D1,E1,F1),CONCATENATE("00",G1+1),"001")
I went through some posts but couldn't find much help.
I have a data set like this
Column A Column B Column C
ABC ZZZ 123
BBB ABC 234
ZZZ BBB 567
I need to write a formula in Column D that if ABC is available in Column B, get me Column C value.
I tried all VLOOKUP functions but couldn't find one appropriately. Can someone please help on the same?
Have you tried this with VLOOKUP in D1
=VLOOKUP(A1,$B$1:$C$3,2,0)
After writing this in D1, drag this to the end
Column A Column B Column C Column D
ABC ZZZ 123 =VLOOKUP(L2,$M$2:$N$4,2,0)
BBB ABC 234 567
ZZZ BBB 567 123
I have 2 sheets with different values. I need to find a value from one cell.sheet1 in sheet2 and copy value from nextcell_in_the_same_row.sheet1 to nextcell_in_the_same_row.sheet2.
It is very difficult to explain let look at the example bellow.
E.g.
Before
first sheet:
A B
1 aaa 123
2 bbb 456
3 ccc 789
4 ddd 122
second sheet:
A B
1 aaa
2 ada
3 cca
4 ccc
After
first sheet:
A B
1 aaa 123
2 bbb 456
3 ccc 789
4 ddd 122
second sheet:
A B
1 aaa *need to find value in the first sheet and copy value from B2 because aaa in A1*
2 ada *value does not exist in the first sheet so copy nothing*
3 cca *not need to copy because no value in the first sheet*
4 ccc *need to copy the value from B3*
Thank you so much!
Use a VLOOKUP along with an IFERROR.
=IFERROR(VLOOKUP(A1, Sheet1!A:B, 2, 0), "")
This will do what you described (well described, by the way!) in your question. Drag the formula down in Sheet2 till the bottom.
VLOOKUP takes the value of A1 in sheet 2 (no sheet reference because the value is in the same sheet as the formula) and looks it up in column A of Sheet1.
It returns the second value (hence why 2) of the table selected in the formula (column A is 1, column B is 2).
The 0 tells the VLOOKUP to look for exact matches. You don't need approximate match here.
And IFFERROR is there in case VLOOKUP doesn't find anything (like with ada) and instead of giving #N/A, returns an empty cell, "".
Trying to combine the data into one master sheet. I have something like below:
Sheet 1 Sheet 2 Sheet 3
Name Gain(Y/N) Name Gain(Y/N) Name Gain(Y/N)
AAA Y AAA Y AAA
BBB N BBB BBB N
CCC CCC Y CCC Y
DDD DDD DDD Y
EEE EEE EEE N
Ultimately would look something like (merging all the sheets into sheet1)
Sheet 1
Name Gain(Y/N)
AAA Y
BBB N
CCC Y
DDD Y
EEE N
The problem is that consolidate function won't work for Text string (Y/N)
I am thinking something like 'if vlookup' or match index? but for multiple reference?
and not overriding each other. Maybe there is simpler way...
Thanks for your help :D
=IF(OR(Sheet1!B2="Y",Sheet2!B2="Y",Sheet3!B2="Y"),"Y",IF(OR(Sheet1!B2="N",Sheet2!B2="N",Sheet3!B2="N"),"N",""))
in B2 of a new sheet and copied down may suit.
Edit Simplification of revised formula to reflect edit to question:
Filter Sheet1 for Gain (Y/N) (assumed to be ColumnB) for (Blanks) and in the cell with the smallest visible row number enter:
=IF(OR(VLOOKUP(A4,Sheet2!A:B,2,0)="Y",VLOOKUP(A4,Sheet3!A:B,2,0)="Y"),"Y",IF(OR(VLOOKUP(A4,Sheet2!A:B,2,0)="N",VLOOKUP(A4,Sheet3!A:B,2,0)="N"),"N",""))
Change 4s in A4s to smallest visible row number (adjust column references as necessary) and copy down as required.
If you don't mind creating an extra column on each sheet, you could turn "Y" and "N" into a number. Assuming your labels are in column A, you insert a new column B and put the following in B2:
=IF(A2="Y", 3, IF(A2="N", 2, 1))
Repeat for all sheets. Now you can do consolidation, using the "MAX" function. It will return 2 if the letter "Y" appeared anywhere, etc. Now you can get back to Y/N/blank by putting the following formula in a column next to the consolidated data:
=INDEX({" ","N","Y"}, B2)
This will return " " if B2 is 1, "N" if B2 is 2, etc. Finally you can copy the entire column, and "paste special - values" to get exactly what you wanted.
You might as well use Microsoft Query to fetch all the data into a pivot with a code similar to this:
SELECT Name, Gain, 'Sheet1' as [Sheet#]
FROM Sheet1
UNION
SELECT Name, Gain, 'Sheet2' as [Sheet#]
FROM Sheet2
UNION
SELECT Name, Gain, 'Sheet3' as [Sheet#]
FROM Sheet3
I need some help copying data from one excel worksheet to another. For example:
Sample Data
__A__B___C
1 aaa bbb ddd
2 bbb ccc eee
3 ccc fff rrr
4 ccc fff ttt
5 ddd eee ggg
6 aaa ddd eee
7 bbb fff hhh
8 eee eee eee
So for the above records if I do a 'CTRL + F' and search to find All 'eee' the results will show 6 instances in C2, B5, C6, A8, B8, C8
Now I want to copy the whole of rows 2,5,6 and 8 to another worksheet.
This worked for me... a simple solution:
Select/highlight the data you want to search
Press ctrl +h for Replace
Enter the string you want to find in "Find What".
Select "Replace with" Format, then Format > Fill and choose a background fill, doesn't matter what color. Then click [Replace All].
Then choose on the Excel menu > Data > Sort on "Cell Color",
Order (the color you chose from step 4 above) and then "On Top" or "On Bottom" - whatever you want, click [Ok].
Now all the data you wanted is all in one block of rows. Copy and paste to another worksheet as required.
To achieve what you need please do the following (assuming your data is located in columns A:C starting row 2, i.e. there are headers):
Type in D2 (additional column): =IF(OR(A2:C2="eee"),1,0), but press CTRL+SHIFT+ENTER instead of usual ENTER - this will define an ARRAY formula and will result in {} brackets around it (but do NOT type them manually!).
Autofill formula as required.
Add filter to the whole A:D range.
Apply filter to column D for value 1.
Copy entire filtered columns A:C and paste anywhere - only filtered rows will be copied.
Sample file: https://www.dropbox.com/s/qscwbf5kbnwi5pa/Filtering3Columns.xlsx
I think what you are looking for is called VLOOKUP just take the Excel-help, theres everything explained
The easiest way I found was this: Using the option "Sort & Filter" located in the right upper corner. Then you can filter any column by any criteria you like. By doing that only the filtered rows appear on the spread sheet (the rest are still there but just hidden). From there you can easily copy and paste the entire rows.