# Vlookup for data (yield only numeric values)

#### AlGuy

##### New Member
I am working on a spreadsheet and need to automate data reporting. I update the spreadsheet with data on a daily basis.

Consider the table below:

 A B 1 2 Wednesday, December 26, 2012 6300 3 Thursday, December 27, 2012 NC 4 Friday, December 28, 2012 NC 5 Monday, December 31, 2012 6200 6 Wednesday, January 02, 2013 NC 7 Thursday, January 03, 2013 6080 8 Friday, January 04, 2013 6090 9 Monday, January 07, 2013 NC

<tbody>
</tbody>

I want to get the last 2 Fridays' value. And in case the value of a Friday is not a numeric value (so the cell contains "NC"), the formula should take the closest value going up. In the example below, the formula should yield:
- for the most recent Friday (January 4 2013): 6090 (A basic vlookup formula should work fine here: In B1, I add the date and use the formula: VLOOKUP(\$B\$1,Cours!\$1:\$1048576,2,FALSE)).
- for the Friday before the most recent: 6300 (The value for that Friday is NC, but since it's not a number, the formula should look for the most recent numeric value which occurred on December 26, 2012). The previous formula would have return "NC", which is not helpful for my calculations.

Thank you to anyone who can help me with solving this issue.

### Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Replies
11
Views
439
Replies
7
Views
212
Replies
5
Views
126
Replies
3
Views
250
Replies
3
Views
154

1,195,849
Messages
6,011,955
Members
441,657
Latest member
Diupsy

### 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.

### Which adblocker are you using?

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

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