Conditional formatting by using formula

Hrishi

Board Regular
Joined
Jan 25, 2017
Messages
56
Office Version
  1. 365
Platform
  1. Windows
Hello, I have few figures arranged in row. In columns 1 i have a figure for reference and I want to highlight figures from columns number 2 to 9 in such a way that summation of those highlighted figures from columns 2 to column under consideration shall be less than figure in column number 1 i.e. 30.

I tried to use sum($2:3)<$1, but ist not working, and if i drag it on right column number 3 in formula is not dragging along.

1
2
3
4
5
6
7
8
9
- 30
5
10
5
3
3
5
5
3

<colgroup><col width="98"><col width="85" span="8"><col width="85"><col width="85"></colgroup><tbody>
</tbody>
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
This is somewhat unclear.
You want to highlight all the figures from column 2 to 9 (B to I) if the sum of their toal is less than the figure in column 1 (A) ?

Select all the columns 2 to 9 (B to I) FOR EACH ROW IN THE TABLE (I suspect there are other rows)

Conditional Formatting
New Rule
Use a formula to determine...

=SUM($B1:$F1)<$A1

Format as required
 
Last edited:
Upvote 0
Is this the expected result?


A
B
C
D
E
F
G
H
I
1
1​
2​
3​
4​
5​
6​
7​
8​
9​
2
30​
5​
10​
5​
3​
3​
5​
5​
3​

If so, select B2:I2
Home > Conditional Formatting > New Rule > Use a formula...
insert this formula
=SUM($B2:B2)<$A2
Pick the format you want (Fill yellow in the example)

M.
 
Upvote 0
Yes This is what is expected. However its not showing result to me when I tried several times. I used same formula. Can you plz look into it. I am pasting image here to show how i tried. let me know if you can see image.
 
Last edited by a moderator:
Upvote 0
your formula says $G4:G4

you should always go from 1, conditional format is very buggy.
=$F1<sum($g1:$n1)
< SUM($G1:$N1)
manage rules
expand the range for whole worksheet, range G:N, check if F1 is still F1 and not F1045646</sum($g1:$n1)
 
Last edited:
Upvote 0
I guess you have interpreted differently. I don't want to highlight F4 from above table. I want to highlight cells from G4 onward till N4, that too only those cell if sum if those cells is less than F4 i.e. 30 in above tale. so as per table in previous thread my formatting formula should highlight G4 to L4.
 
Upvote 0
I selected G5 to N5 cells, then in formula window in conditioning format I typed formula sum($G4:G4)<$F4, then customized format for cells

Still its not working. i tried in several files as well. snapshot is linked here. https://drive.google.com/open?id=1rf934P1t1CIUsrgYimPj9SLw27IBn5Nt
I suspect that you initially did not quite enter the formula correctly. If you look at the formula in the image you linked to, you will see it actually shows

="SUM($G4:G4)<$F4"

Go back in to the CF dialog and choose manage Rules & edit the rule to remove those quote marks in it.
 
Upvote 0
Oh I see, I had typed Sum($G4:G4)<$F4 and entered then excel put sign of = and " quotes on its own. so i thought its default correction by excel. so i didn't try to remove it.
Thanks a lot sir. Now it worked as I wanted. A big Thank to you.
 
Upvote 0

Forum statistics

Threads
1,216,729
Messages
6,132,381
Members
449,723
Latest member
Ghufran

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