Return any value greater than 0 from a range, using excel formula or vba.

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
128
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Greetings, esteemed volunteers.
In cell Y2, I am trying to get any number from the range AC2, AE2, AG2, AI2.
Y2 has the formula: =MAX(AC2,AE2,AG2,AI2), but even though the cell AC2 displays a value, Y2 returns a 0.

1578053246017.png

Each of the cells (AC2,AE2,AG2,AI2) has a formula to determine what value is displayed, as can be seen in AC2 which returns a value of 1.
If the formula in AC2 is deleted and a "1" is typed into the cell, then Y2 does indeed return the value of 1.

1578055280980.png

your help is always appreciated.
kind regards
Andy
 

Attachments

  • 1578055137849.png
    1578055137849.png
    32.8 KB · Views: 12
Try in AC2
=IF($U2=$AC$1,$T2+0,"")
or in T2
=IF(Sheet1!W2>0,--LEFT(S2,(FIND("mm",S2,1)-1)),"")
 
Upvote 0

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.
Thanks everyone, especially Snakehips, i so appreciate your time and expertise.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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