# Sum cells that are adjacent to conditionally formatted cells

#### Bijaz

##### New Member
Hello,

I have conditional formatting in column A and a count of those issues in column B. For instance, I would like to sum all fo the cells in column B in which the adjacent cell has conditional formatting (ie. if a cell in column A is red, I would like to sum all of cells adjacent to it in column B) Any recommendations?

### Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

#### alvin-chung

##### Active Member
Hi, try use SUMIF in conjunction with your Conditional Formatting rules.

#### pgc01

##### MrExcel MVP
I have conditional formatting in column A and a count of those issues in column B. For instance, I would like to sum all fo the cells in column B in which the adjacent cell has conditional formatting (ie. if a cell in column A is red, I would like to sum all of cells adjacent to it in column B) Any recommendations?

Hi

Use the condition you used in the conditional formatting.

#### Bijaz

##### New Member
Hi, try use SUMIF in conjunction with your Conditional Formatting rules.

This is the formula I used, and it comes back as zero:
=SUMIF(A2:A61, "floor", B2:B61)

Basically, if the a cell in column a contains the word floor, I want to sum the count in column B. Is this correct?

#### Jonmo1

##### MrExcel MVP
What's the exact condition you used in conditional formatting?

Do the values in column A contain the word floor by itself, or is it among other text like "the floor is carpeted" ??
If this is the case, try
=SUMIF(A2:A61, "*floor*", B2:B61)

Perhaps the values in column B are not real numbers, but numbers stored as text?
What does this return
=ISNUMBER(B2) - repeat for all values in column B

#### Bijaz

##### New Member
What's the exact condition you used in conditional formatting?

Do the values in column A contain the word floor by itself, or is it among other text like "the floor is carpeted" ??
If this is the case, try
=SUMIF(A2:A61, "*floor*", B2:B61)

Perhaps the values in column B are not real numbers, but numbers stored as text?
What does this return
=ISNUMBER(B2) - repeat for all values in column B

Aha! Worked perfectly! Thanks, and have a great week.

#### Jonmo1

##### MrExcel MVP
Glad to help, thanks for the feedback.

Replies
3
Views
239
Replies
13
Views
354
Replies
2
Views
448
Replies
1
Views
614
Replies
13
Views
440

1,170,931
Messages
5,872,774
Members
432,944
Latest member
mj02

### 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.

### Which adblocker are you using?

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

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