MATCH Function

rge0036

New Member
Joined
Jan 4, 2011
Messages
4
Using the MATCH function, I want the lookup_value to be a blank cell. I have tried =MATCH(,O18:O72,0) and =MATCH("",O18:O72,0) but neither work. How do I set the lookup_value to be a blank??<!-- google_ad_section_end -->
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Jeff,
Thanks for replying. It will be easier if I briefly describe the issue rather than a screen shot.

I am trying to keep track of the change in a stock price during the year. So in Column A are dates starting on Jan 1, 2011 and the last date is Dec 31, 2011. In column B is the stock price. About every other day, I insert a row above Dec 31 with the new date and new stock price for that date. Of course, the stock price for Dec 31, 2011 is blank. So the columns might look as follows:

1/1 $71.35
1/3 $72.46
1/4 $73.81
12/31

After inserting a new date and price, I want the spreadsheet to automatically calculate the dollar difference between the new stock price and the price on 1/1 ($71.35). I am currently using =INDEX(B1:B4,MATCH(0,B1:B4,0)-1)-B1. But this requires that I put a stock price of $0.0 after Dec 31 which screws up my plot. How can I set the look_up value in the MATCH function to look for a blank (on Dec 31) rather than have to add $0.0 on Dec 31?

Hello & Welcome to the board,

Can you post a small screen shot of what you are trying to do?

http://www.mrexcel.com/forum/showpost.php?p=2545970&postcount=2
 
Upvote 0
Why are you looking for the blank, why not look for the last value, it's much easier.

=LOOKUP(9.9999999999E+307,B:B)-B1
 
Upvote 0
This is a MUCH better solution than what I was trying. It does exactly what I wanted. Thanks. And thanks to Jeff and Haseem for replying as well.

Bob.

Why are you looking for the blank, why not look for the last value, it's much easier.

=LOOKUP(9.9999999999E+307,B:B)-B1
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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