Lookup formula not working if pointed to cells with formulas

Exceleration65

New Member
Joined
Mar 25, 2024
Messages
3
Office Version
  1. 2021
Platform
  1. Windows
I've successfully used the below formula several places in my spreadsheet. However, when I point it to a cell range that has formulas in it, it only works for the value in cell G5.

In the first row, the below formula points to cells w/calculations and only returns the last number in the row if there is a value in cell G5. If G5 is blank, it does not display any other value from that row.
=LOOKUP(2,1/(D5:G5<>""),D5:G5)

In the second row, the below formula points to cells with just numbers (no formulas) and works as designed.
=LOOKUP(2,1/(D6:G6<>""),D6:G6)

My goal is to retrieve the last value in a row. All the cells in the row have the =sum() formula in them. Any help would be greatly appreciated! :)
 

Attachments

  • excelCalc.png
    excelCalc.png
    8.7 KB · Views: 5

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You did not specify what you mean by "not working".
G5 has a formula. So last number in row 5 is the number in G5.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,072
Members
449,093
Latest member
ripvw

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