VLOOKUP Formula causing an error

J

japc90

=COUNTIF(B6:E42,"*out")+COUNTIF(B6:E42,"*vac")+VLOOKUP(C50,$H$43:$K$47,4)

I am trying to use the above formula and I keep receiving a #N/A error.
There is currently a cell (C50) where the user will type in a day of
the week. It is supposed to then lookup that day of the week on an
adjacent chart and pull in the number that is located in the cell to
the right of that day. It works for the cells containing Monday -
Thursday, but when Friday is entered it will not work. I have checked
to make sure that the formula contains the correct cell range. It will
also work if I change Friday to anything else unless it is an
abbreviation of Friday then I still receive the above mentioned error.

I am extremely confused.
 
G

Guest

You need to add a Range_Lookup argument to your VLookUp function.

=VLOOKUP(C50,$H$43:$K$47,4,FALSE)

Otherwise, VLookUp searches for an apporximate match instead of an exact
match. Thus Monday, Tuesday, and Wednesday return correct values as they are
in alphabetical order, but Thursday would return Tuesday's value and Friday
would not be found.

HTH,
Elkar
 
J

japc90

Thank you.
Elkar said:
You need to add a Range_Lookup argument to your VLookUp function.

=VLOOKUP(C50,$H$43:$K$47,4,FALSE)

Otherwise, VLookUp searches for an apporximate match instead of an exact
match. Thus Monday, Tuesday, and Wednesday return correct values as they are
in alphabetical order, but Thursday would return Tuesday's value and Friday
would not be found.

HTH,
Elkar
 

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