ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VLOOKUP Formula causing an error (https://www.excelbanter.com/excel-discussion-misc-queries/101273-vlookup-formula-causing-error.html)

japc90

VLOOKUP Formula causing an error
 

=COUNTIF(B6:E42,"*out")+COUNTIF(B6:E42,"*vac")+VLO OKUP(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.


Elkar

VLOOKUP Formula causing an error
 
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


"japc90" wrote:


=COUNTIF(B6:E42,"*out")+COUNTIF(B6:E42,"*vac")+VLO OKUP(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.



japc90

VLOOKUP Formula causing an error
 
Thank you.
Elkar wrote:
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


"japc90" wrote:


=COUNTIF(B6:E42,"*out")+COUNTIF(B6:E42,"*vac")+VLO OKUP(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.





All times are GMT +1. The time now is 04:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com