Excel 2003, accepting valued for calculation based on adjacent cell

network_engineer

New Member
Joined
May 14, 2011
Messages
37
Hi all,

So, this IS different from the other question. And I will try my best to describe this as accurately as possible. Apologies if I don't come across clear!

I have two columns, C and D, with rows 4 through 65536. And I will have a SUM of all values from column D. I.e. D3, will be a sum of values from D4:D65536, i.e. D3 =SUM(D4:D65536)

C will have values (personally defined) from a list, such as H, N, L (High, Nominal, Low); however, I want that D3 would be a sum ONLY if the respective adjacent cell in C would be H.

E.g.

C4 = H, D4 = 1;
C5 = H, D5 = 1;
C6 = N, D6 = 1;
C7 = H, D7 = 1;
C8 = L, D8 = 1;
C9 = H, D9 = 1;
---------------
D3 = 4

A normal sum of D4:D9 should be 6; however, based on C6 and C8, the values are not taken into account.


Thanks a lot.

Kind regards.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi again,

Edited under: //I suppose the formula goes into D3; however, it says the formula has an error! I tried playing around, but did not help. Any ideas?//

Edited later: Oops, my mistake, it worked perfectly! Thanks again!

Kind regards,
Ben
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,835
Members
452,947
Latest member
Gerry_F

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