Formula error

ddub25

Well-known Member
Joined
Jan 11, 2007
Messages
625
Office Version
  1. 2019
Platform
  1. Windows
I have following formula that works as expected with the table below.

{=MAX(MAX(B2:B12)-IF(ROW(B2:B12)-ROW(B2)+1 >MATCH(MAX(B2:B12),B2:B12,0),B2:B12,9.99999999999999E+307))}

-14.00____-14.00
115.00____101.00
101.50____202.50
163.00____365.50
-81.50_____284.00
14.50_____298.50
-56.00_____42.50
7.00______249.50
29.50_____279.00
-11.00_____268.00
8.50______276.50

However, when I adapt the formula to:

{=MAX(MAX(E28:E327)-IF(ROW(E28:E327)-ROW(E28)+1 >MATCH(MAX(E28:E327),E28:E327,0),E28:E327,9.99999999999999E+307))}

to apply it to another table, it returns "#########....". The table I am applying it to has entries on every cell - no blanks.

Any ideas why?

Dan
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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