Lookup with gaps

P

Phil

Hi,

I have the following:

Account No Amount

xxxxx yyyy
xxxxx yyyy
xxxxx yyyy
xxxxx yyyy
Sub total

xxxxx yyyy
xxxxx yyyy
xxxxx yyyy
xxxxx yyyy
Sub total

Etc.....
I want a formula that will go search for an account number
from all the ones above, and return the yyyy amount.

Thanks in advance,
Phil
 
D

Don

Hi Phil

Assuming your data is in A9:B15 (can have blank rows as
you show. Enter account nbr in C9...adjust to fit your
worksheet....

=VLOOKUP(C9,A9:B15,2,FALSE)

HTH,

Don
 
P

Phil

Hi Don,

I get an #N/A with that. I think it is because the account
numbers it is going to lookup up from are not sorted in
numerical order??

Phil
 
D

Don

G'morning Phil,

Works fine here....only way I can get #N/A is by inputting
an acct nbr that doesn't exist in the range. Is this
imported data? If so, you might have some leading or
trailing spaces.

Don
 

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

Top