I've no idea how to do this. :(

  • Thread starter Thread starter MagnoliaSouth
  • Start date Start date
M

MagnoliaSouth

I have two worksheets, one is named Db and the other Info. Info is basically
an easy to read record summary and this summary comes from each record in
Db. I have a unique number assigned (a record number) for each record on the
Db sheet and is located in Column A. I will enter that record number
manually in cell D41, on the Info sheet. On the Info sheet, I want cell D29
to first look in D41 and match that record number to the same number in
Column A on the Db sheet. Once it finds that number, I want it to list
whatever is located in that row's V column.

So say that Info!D29 looks in Info!D41 and the number is 765. It now looks
in Db!'s A column and finds that Db!A73 is 765, which matches the same
record number as Info!D41. So it knows that row 73 is the row number it
needs. It then needs to look across the row to column V and whatever is in
that cell (Db!V73) is what also now goes in Info!D29. In turn, if there is
nothing in the cell, then I want it to also remain blank; I don't want a 0
in there.

Phew! Anyway, is this possible? I've NO idea whatsoever how to do this. I've
read until my eyes have crossed and I'm still at a loss.

I'm using Excel 2003 in Windows XP.
 
Mag,

You're describing a VLOOKUP formula:

=VLOOKUP(D41,Db!A1:V1000,22,False)

To not return a zero:

=IF(VLOOKUP(D41,Db!A1:V1000,22,False)-"","",VLOOKUP(D41,Db!A1:V1000,22,False))

HTH,
Bernie
MS Excel MVP
 
Thank you so much for your response Bernie, but for some reason I'm getting
an error. I copied and pasted the function (or is it formula?) into Info!D29
but it's saying that cell Info!D41 isn't valid. It's highlighting D41 in
blue. I clicked on Show Calculation Steps and it replaces:

=IF(VLOOKUP(D41,Db!A1:V1000,22,False)-"","",VLOOKUP(D41,Db!A1:V1000,22,False
))

with

=IF(VLOOKUP(765,Db!A1:V1000,22,False)-"","",VLOOKUP(D41,Db!A1:V1000,22,False
))

And 765 is italicized. I'm baffled. Any ideas on what I'm doing wrong. I've
double checked all the cells and sheet names, all are correct.

Thanks in advance for any further advice!
 
Sorry, I had a typo - hit the dash insted of the equal key:


=IF(VLOOKUP(D41,Db!A1:V1000,22,False)-"","",VLOOKUP(D41,Db!A1:V1000,22,False))

Should be:

=IF(VLOOKUP(D41,Db!A1:V1000,22,False)="","",VLOOKUP(D41,Db!A1:V1000,22,False))

The formula above worked fine for me...

Bernie
 

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

Back
Top