JACOBB9900

New Member
Joined
Apr 8, 2019
Messages
38
Hello,

Can someone help me understand this array formula. I found it online. It returns the value in the last occupied cell in a row but I would like to understand how the middle section works. My understanding is that ($T14:$HK14<>"") is FALSE, so what does dividing 1 by FALSE work. If that's what's going on. Also, only cells T14 to FJ14 have data. Cells FK14 to HK14 are empty. See formula below.

=LOOKUP(2,1/($T14:$HK14<>""),$T14:$HK14)

Thank you.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
This part
($T14:$HK14<>"")

will give an array of TRUE or FALSE responses depending on whether the cells are empty.
when you divide 1 by that array the True becomes 1 & the False becomes 0 so you endup with an array of 1,1,#div0 , #div0
The best way to figure out what a formula is doing, is the use the Evaluate Formula option on the formulas tab. That way you can see exactly what is happening.
 
Upvote 0

Forum statistics

Threads
1,213,537
Messages
6,114,216
Members
448,554
Latest member
Gleisner2

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