Formula Assistance

Sundance_Kid

Board Regular
Joined
Sep 2, 2017
Messages
128
Office Version
  1. 365
Platform
  1. Windows
Hey Folks

I have 6 columns each relating to a different tower with a cost for each tower - so columns G to L.

I have above each column a dropdown with either Yes or No.

If I select Yes for 4 columns/towers I want the formula to calculate the combined cost of the 4 towers, if I select Yes for two column/towers, I want the formula to calculate the combined cost of the two towers.

I thought I had it working but it seems, if I select Yes on columns 1,2 & 3, No on column 4 & Yes on column 5, it will only add the columns 1,2 & 3. It is like the formula stops after one of the columns says No.

This was my formula below, but if column J was a No and column K was a Yes along with columns G, H & I, the formula would only add the amounts in column G,H & I and not add the amount in column K.

=IF(G21="Yes",G42+IF(H21="Yes",H42+IF(I21="Yes",I42+IF(J21="Yes",J42+IF(K21="Yes",K42+IF(L21="Yes",L42+IF(M21="Yes",M42),0))))))

Any idea what the issue is?

Thanks
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
try this:
Book3
GHIJKLMN
18
19
20
21YesNoYesNoYesNoNo9
22
23
24
25
26
421234567
Sheet1
Cell Formulas
RangeFormula
N21N21=SUMIF(G21:M21,"Yes",G42:M42)
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,291
Members
448,564
Latest member
ED38

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