Formula help

RattlingCarp3048

Board Regular
Joined
Jan 12, 2022
Messages
166
Office Version
  1. 365
Platform
  1. Windows
i am trying to build a formula to do a calculation between 4 columns where any one of the values could be missing at any given time. I want the formula to only calculate when values are present. I know how to build using the if function but there are so many possible combinations that im not sure how to capture them all. If anyone knows of an easier way could you please help? The values of the cells are being returned via formula that cannot be removed (it would be so much simpler if i could). Here is a sample.... this does not reflect every single possible combination, just a sample.

column QColumn RColumns SColumn T
(Q)(R*3)(S*2)(T)<<calculation for each column
CountedMissingManualElectronicExpected Resultvvv calculation being performed
48122072((Q+(R*3))+((T+(S*2))
481252((Q+(R*3))+(S*2))
4828(Q+(R*3)
44Q
482048((Q+(R*3))+T)
4122048(Q+((T+(S*2))
82044((R*3)+T)
122044T+(S*2)
8122068((R*3)+((T+(S*2))
42024(Q+T)
 
You're welcome! Good find on sumproduct. One of my favorite functions has another use. I believe you could simplify further by doing this:
Excel Formula:
=SUM(A3:D3)+SUMPRDOUCT(B3:C3,{3,2})
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
You're welcome! Good find on sumproduct. One of my favorite functions has another use. I believe you could simplify further by doing this:
Excel Formula:
=SUM(A3:D3)+SUMPRDOUCT(B3:C3,{3,2})
that did not work. the calculations came out much higher than they should have. ill be ok with the other formula. its no big deal. its already much simpler than my original direction.

this has struck my curiosity though (if i need a new thread ill be happy to make one) but what if i want to go the other way, divide or subtract and ignore non numeric values instead of multiply?

for example: =(AD3/2) + AE3 + ((AF3 - AE3) * 0.1) right now i have several nested if's just to ignore the non numeric values. its similar circumstances to this original post, just a little different.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
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