Don't understand this range reference

Inclement

New Member
Joined
Oct 8, 2019
Messages
3
From this post:
Code:
=$b4+lookup(2,1/($d$1:$d3<>""),$d$1:$d3)

wbd

The OP's question was this:
I want a formula that would do the following

In cell D4 add D3+B4, but if D3 is blank then find the previous non blank cell and add B4 to that cell (In this case D1).

I would need these to work regardless of the number of blanks between.

Thanks


Why does the lookup range start with "1/"? What does it do? All I can think is that it really is meant to be a reciprocal, because the OP wants the previous non-blank cell - ? I experimented with removing "1/" and got an #N/A error.

Also, if anyone can point me to more information about this "1/" thing, or about using logical expressions with ranges, as WBD did with $d$1:$d3<>"", I'd appreciate it. Tried Googling, didn't find anything (probably due to poor search terms).
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Ohhh - I was looking at it through normal-formula glasses, and it's a whole different "thing," so to speak, at a level of Excel I've never seen before. Erp.

Okay, well, I will go through that article with a fine-toothed comb and see where I get. Thank you!
 
Upvote 0
the 1 at the beginning of this section of the formula "forces" the results from, for example, {TRUE,FALSE,TRUE}

Code:
1/($d$1:$d3<>"")

to then having 1 be divided by them, thus forcing them to be numbers {1,0,1}
 
Upvote 0
...and then the 2 in lookup(2 goes through the {1,0,1} set, never finds an exact match, so it matches the last occurrence in the set of the biggest number that's smaller than it (whew), which in this case would be the second 1 - ? And then it looks to lookup's last argument (range) to know what to display in the cell -?

Is that right?

Thank you!
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,168
Members
452,615
Latest member
bogeys2birdies

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