I have the following VLOOKUP in a cell on sheet1.
=VLOOKUP(I2,Sheet2!B:C,2)
I assumed that this would attempt to return the corresponding value in column C on sheet 2 if it found a value in column B on sheet 2 that matched the value in I2 in sheet 1.
This doesn't seem to work though. Any ideas where I'm going wrong?
Think you need to add the 4th parameter - range_lookup. I always set this to FALSE.
i.e. =VLOOKUP(I2,Sheet2!B:C,2,FALSE)
With my Excel 2003 it is working, when I replace the "," by ";". Are there versions out there that exepts "," as divider between the parameters?
This is working for me:
=VLOOKUP(I2;Sheet2!B:C;2)
If you want to have only exact matches then you should use
=VLOOKUP(I2;Sheet2!B:C;2;FALSE)
Related
could someone please tell me whats wrong with my =VLOOKUP(E3;E:E; 2;0) - function?
In German it is the following: =SVERWEIS(E3;E:E; 2;0)
I never used the VLOOKUP - function before so I just try to make it work somehow. Unfortunately it does not get the reference right, although I compare numbers with numbers in the same workbook. I also tried =SVERWEIS(E3;E:E; 2;1) but it didn't work either.
Thank's a lot!
Greetings!
You have the number 2 for the column where the values are located, but your range is only 1 column. If the value you want to return is in column E then the number 2 should be a 1. But if the value you want to return is in column F, then you need to change the range to include column F
I want to concatenate the value of two columns in the current sheet and then result should be compared with the concatenation of two column value in another sheet.
e.g - The entered value in Column W and X in current sheet after concatenation should be compared with the existing value in column Y and column Z(after concat) of another sheet.
I have tried using the formula COUNTIF(Sheet2!CONCAT($W$2,$X$2:$Y$2,$Z$2),A2)>0 and some different alteration in this but it seems COUNTIF has range and criteria as argument and this is string which is causing error.
If you want to compare, a simple '=' will do.
Concatenation can be done using '&'.
in current sheet:
=W1&X1=Sheet2!Y1&Sheet2!Z1
will return TRUE if both concatenations are equal and FALSE if they are not.
To find the value W1&X1 in the entire range, I suggest you use a help column (unless you are willing to write a macro). In the help column of sheet1, you concatenate the values (=W1&X1 - drag down). In the hlep column of sheet2 you do the same. Then you make an additional column to check for matches, by using
=match(ValueHelpColSheet1,HelpColSheet2,0)
This formula returns the row number in which the match is found and an error when the corresponding value is not found. You can replace this error with something else using IFERROR if you want to.
I currently have a large nested IF statement that uses a helper cell (C1) to dictate which formula to utilize based on numbers 1,2,3,5 & 6. Specifically, one IF statement within the larger nested IF statement needs to be updated for instances when there is a blank cell in column A. Here is how my workbook is setup:
Data Tab
Bonus Tab
Summary Tab
This is my current formula in Column B:
=IF(Data!$C$1=2,IF(SUM(Bonus!B2:C2)<1,0,1)*Data!$B$3+Data!$B$2)
What I am looking for is when cells in column A are blank, than the corresponding cell in Column B would be 0. Again, the formula above has to remain in the =IF(Data!$C$1=2, format since it is part of a larger nested IF statement.
Answer I am seeking:
Thank you for looking!
Try this:
=IF(Summary!A2="",0,IF(Data!$C$1=2,IF(SUM(Bonus!B2:C2)<1,0,1)*Data!$B$3+Data!$B$2))
How about adding an IF in there like this?
=IF(Data!$C$1=2,
IF(LEN(Summary!A2)>0,1,0)*
(IF(SUM(Bonus!B2:C2)<1,0,1)*Data!$B$3 + Data!$B$2))
or like this
=IF(Data!$C$1=2,
IF(LEN(Summary!A2)>0,
IF(SUM(Bonus!B2:C2)<1,0,1)*Data!$B$3 + Data!$B$,
0))
What about:
=IF(AND($C$1=2,LEN(A2)>0),IF(SUM(Bonus!B2:C2)<1,0,1)*Data!$B$3+Data!$B$2)
I realise this gives you FALSE rather than 0 at the end, but I don't know what the rest of your 7 IF statements look like.
EDIT
Based on #AlexisOlson 's comment:
=1*IF(AND($C$1=2,LEN(A2)>0),IF(SUM(Bonus!B2:C2)<1,0,1)*Data!$B$3+Data!$B$2)
This now returns 0 when Column A is blank, as required.
I need some help with the following:
There is four columns one is first is imported the two others are standard info (list) and the fourth is what we need to export.
Can someone help me with this please???
I can't get excel to think something like:
Check if A4 matches any of C4 to C8.
If yes show the D cell next to the C cell in F4.
Sorry to be a pain, any help is much appreciated.
Thanks
Theo
Looks like a job for INDEX-MATCH. In F4:
=INDEX($D4:$D8, MATCH($A4, $C4:$C8, FALSE))
What this does:
Looks for an exact match (FALSE) of $A4 within the range $C4:$C8 and outputs the relative row index where it found the match.
Gets the value from the range $D4:$D8, in column 1 and the row it found in step 1.
I have two columns of numbers. Both are 1 to 5. I want to count all the cells where the left column value equals the right column value AND the left column value equals a certain value.
I tried this:
=SUM(IF(W2:W13=X2:X13 AND W2:W13=4,1,0))
I've tried pressing Ctrl+Shift+Enter and it adds {} around the formula but that didn't help either.
I think it's the W2:W13 = 4 part that doesn't work
=COUNTIFS(W2:W13,"=4", X2:X13, "=4")
You can use the sumif() function:
SumIf( range, criteria, sum_range )
it will apply the criteria for each row in the range.
Edit: to count the matches, you can use sum_range = 1 or use the Countif() function suggested by Ben in his answer
Have you considered a third column (C) with the formula IF(A1=B1,1,0) and then summing that third column?
I'm not much of an Excel Expert, but didn't they craeted the COUNTIF(range, criteria) function for this?
Add a third column eg Z2:Z13 with this formula: IF(AND(W2=X2; W2=4); 1; 0)
Then sum that one.
I don't have Excel 2007. So here's how you can do it in Excel 2003:
=COUNT(IF((W2:W14=4)*(X2:X14=4),Y2:Y14))
Since you are looking for a specific value and the column next to it to be the same value, you can just compare both columns to the same value.
The trick to get this to work is after entering the formula you need to hit F2 to go into edit mode and then hit CTRL-SHIFT-ENTER which makes this formula an array formula. This will put {} around the entire formula. Without making this an array formula this formula won't work.
I found this information in the Excel help document titled Count how often a value occurs