More than one iserror in a formula???

donh

Board Regular
Joined
May 7, 2002
Messages
151
I am trying to create a vlookup for sequential dates

In the table it is looking up there could be as many as 3 dates not there

Can an iserror statement be built for this to look back to the last valid date?

row dates vlookup from another table
A B C
10 1/10/2000 9.66
11 1/11/2000 9.51
12 1/12/2000 9.76
13 1/13/2000 9.71
14 1/14/2000 10.12
15 1/15/2000 #N/A
16 1/16/2000 #N/A
17 1/17/2000 #N/A

I would like for the value in rows 15, 16, 17 to be 10.12

I can get one iserror to work with date -1 to look above but when a second iserror is working in the formula when I copy it for the entire range the vlookup in row 14 (which is correct) changes to the value that is in row 13.

Currently this is what I have in column C:
=IF(ISERROR((IF(ISERROR(VLOOKUP(A16,table,7,FALSE)),VLOOKUP(A16-1,table,7,FALSE),VLOOKUP(A16,table,7,FALSE)))),VLOOKUP(A16-2,table,7,FALSE),VLOOKUP(A16-1,table,7,FALSE))

Thanks

Don
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,702
I'm not sure as to your intent, but assuming that A10:B17 contains the data...

To return the last numerical data...

=LOOKUP(9.99999999999999E+307,B10:B17)

To return the corresponding date...

=LOOKUP(9.99999999999999E+307,B10:B17,A10:A17)

Hope this helps!
 

Forum statistics

Threads
1,136,926
Messages
5,678,605
Members
419,775
Latest member
joh93

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
Top