Add numbers from cells in column A, depending on text in column B

Panthera

New Member
Joined
Mar 4, 2016
Messages
11
I'm having a small problem getting a workable solution created for the below.

My data
- In column A, I have range of percentage values, accumulating to 100%. Each row can have a value of anything from 0.01% up to 100%.
- In Column B, next to the percentage value, I have a text value which is either "Y, N or TBD"

My problem
- I'm trying to summarize all percentage values for each Y, N and TBD entered.

E.g.

ROW 1, 10%, Y
ROW 2, 10%, Y
ROW 3, 20%, N
ROW 4, 50%, TBD
ROW 5, 10%, Y

The outcome should then look like this and change depending on the text value
Y = 30%
N = 20%
TBD = 50%

Hope the above is clear enough
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I'm having a small problem getting a workable solution created for the below.

My data
- In column A, I have range of percentage values, accumulating to 100%. Each row can have a value of anything from 0.01% up to 100%.
- In Column B, next to the percentage value, I have a text value which is either "Y, N or TBD"

My problem
- I'm trying to summarize all percentage values for each Y, N and TBD entered.

E.g.

ROW 1, 10%, Y
ROW 2, 10%, Y
ROW 3, 20%, N
ROW 4, 50%, TBD
ROW 5, 10%, Y

The outcome should then look like this and change depending on the text value
Y = 30%
N = 20%
TBD = 50%

Hope the above is clear enough
A pivot table can help. Select your data with headers. Navigate to Insert menu and click Pivot Table. Click OK.

Drag Column B values to Rows section. Drag Column A values to Values section. You may either sum or take the avarage of values by right clicking them.
 
Upvote 0
Ah so simple, not sure why I didn't think of that. Especially since this data was extracted from another pivot table I created earlier Zzz... Must have been staring myself blind on that IF(A:A="Y",.... ) statement trying to get it to do something.

Thank you for the elegant solution Flashbond. Much appreciated :)
 
Upvote 0
Ah so simple, not sure why I didn't think of that. Especially since this data was extracted from another pivot table I created earlier Zzz... Must have been staring myself blind on that IF(A:A="Y",.... ) statement trying to get it to do something.

Thank you for the elegant solution Flashbond. Much appreciated :)
Thanks for the feedback! You're welcome ;)
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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