need function/formula help!!

R

reneelimon

I hope someone can help me.

I have a workbook with 3 sheets. sheet1=Data Entry, sheet2=daily hours,
sheet3=8day totals.

In sheet1- col a is name, col b is date, col c combines a&b, col d totals
e&f, col e & f are #'s. each row is a different record. These are not
entered in any sort of order.

In Sheet2, col a =dates, row1 col b, c, d, etc are names. For example: i
want cell b2 to get the data from sheet1. i need it to look up the values
from sheet 2-b1 (from sheet1 col a)and sheet2-b2 (rom sheet1 col b), if it
finds a match then enter the resulting number from sheet1-col d, if no match
enter 0.

i have a vlookup function in there now, but if it does not find a match it
results in error #n/a, and i need it to enter 0 if no match found.

I hope this isnt too confusing.

Thank you for your help
 
J

JLatham

Enclose your VLOOKUP(...) formula within an "error trap" for #N/A error:
instead of
=VLOOKUP(...)
use
=IF(ISNA(VLOOKUP(...),"",VLOOKUP(...)))
That will return a zero-length string when no match is found, and will
return the result when the match is found.
 
M

Max

i have a vlookup function in there now, but if it does not find a match it
results in error #n/a, and i need it to enter 0 if no match found.

Try it with an IF(ISNA(..) error trap, like this:
=if(isna(vlookup(...)),0,vlookup(...))
 

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