Consolidating switch formula

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hello all,

I have a shortened version of my formula, and I wanted to see if anybody had an easier way of doing this. I've got another 30 rows to add to the formula, and I haven't had much luck doing a range.

Code:
=(SWITCH(J3,"GONE!",D3,0))+(SWITCH(J4,"GONE!",D4,0))+(SWITCH(J5,"GONE!",D5,0))+(SWITCH(J6,"GONE!",D6,0))+(SWITCH(J7,"GONE!",D7,0))+(SWITCH(J8,"GONE!",D8,0))+(SWITCH(J9,"GONE!",D9,0))

To clarify the formula, Column D has dollar amounts, and J has time formulas which at a certain time, will change to value "GONE!" I need to sum up the values of all those that are "gone"
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,224,829
Messages
6,181,222
Members
453,024
Latest member
Wingit77

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