simple SUM Formula

John Caines

Well-known Member
Joined
Aug 28, 2006
Messages
1,155
Office Version
  1. 2019
Platform
  1. Windows
hello All.

I'm trying to write a simple formula (Which works and has given me the correct result), but I'm not sure the formula is written correctly,, IE it could be a more 'PURE',, condensed form?

My formula is;
Code:
=IF(O28="","",SUM($O$24:$O$28)-SUM($L$24:$L$28))

Is there another way to write the above? Or is this fine?
Just looking at it with 2 SUMs in,,, just doesn't seem correct to me?
Maybe it is,,,,

If anybody could just confirm for me please, or show me if there is indeed a better way to write the above.

Many thanks

John Caines
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Unless you have cells containing those sums that you can use instead to reduce the calculations necessary, I think that is okay.
 
Upvote 0
Looks fine to me, one change you could make is your test condition, i.e.
Code:
=IF(LEN(O28)=0,"",SUM($O$24:$O$28)-SUM($L$24:$L$28)
Otherwise, your formula appears to be as reduced/efficient as it can be...
 
Upvote 0
Many thanks for all your rapid replies,, many thanks.

Great!! Seems fine then,,,

JackDanIce,, Regarding your LEN part in a formula,,, I've never come across that 1 before,, just googled it,,,, hard to understand from what I was reading as my excel VB is poor to be honest,,
http://msdn.microsoft.com/en-us/library/dxsw58z6(v=vs.80).aspx

But,,, seems to do the same as I had,, but maybe in a more 'Pure' way? (Where I'm getting this pure from I don't know :-),,,,

I think I'll migrate over to this 'LEN' part of the formula,, hell, why not,,,:-)

Many thanks again for all your replies.

Best Regards
John Caines
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

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