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.
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,384
Office Version
  1. 365
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,517
Messages
5,602,124
Members
414,505
Latest member
quoctrungvu99

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