Lookup

K

Kaisa

A B C E F
1 SKU SUM SKU SUM
2 85 10 85 10
3 86 20 86 20
4 87 30 88 30
5 89 40

I'm trying to make a formula that can tell me the sum of each number. Like
her, that 85 picks out that it's 10 and so on. But at 88, which isn't in the
original list, it just takes the number above. I wish it could come up as an
error, when it doesn't exist.
The formula I have used here is: =VLOOKUP(D:D;A:B;2)
 
P

Pete_UK

Change your formula to this:

=VLOOKUP(D2;A:B;2;0)

and copy down. The 0 at the end of the VLOOKUP forces it to look for
exact matches, so this returns #N/A if the number is not present.

Hope this helps.

Pete
 
J

Jacob Skaria

Oops....I misread your post

Check out help on VLOOKUP(). In the below formula the last criteria is
whether to look for an exact match or not...

=VLOOKUP(D2,A:B,2,0)

To ignore this error and replace with blank

=IF(ISNA(VLOOKUP(D2,A:B,2,0)),"",VLOOKUP(D2,A:B,2,0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

VLOOKUP 2
Returning Multiple Matches 4
Return Consecutive Values - Pairs 6
Match & Vlookup Function 1
Nested if using range names 1
Return Consecutive Values 8
scatter plot 2
Order the names by ranking 8

Top