VLOOKUP formula not working

Eurekaonide

Active Member
Joined
Feb 1, 2010
Messages
433
Hi All

I have the following set of formulas and for soem reason its not working - I think it must be to do with something around the order (i.e. Ascending etc) as it works if I just type a number in but I need it to fine the number automatically.

First Cell = H40

=CurrRepPeriod (Which relates to another cell where a number is typed manually between 1 and 12)

Second Cell = H42

=VLOOKUP(H40,Sheet2!$B$7:$D$18,3,FALSE)

(This works fine)

Third Cell = H36

=IF(H40=1,"12",(H40-1))

(This needs to notice if the previous cell H40 is showing 12 then it needs to go back to 1) (This works fine)

Fourth Cell = H38

=VLOOKUP(H36,Sheet2!$B$7:$D$18,3,FALSE)

(this returns #NA where I want it to look back down the same table as before and pick up the data which is in relation to number 12)

Any ideas?? :confused:
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try removing the double quotes around 12 in this formula:

=IF(H40=1,"12",(H40-1))

Surrounding a number in double quotes makes it a string.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top