IF Statement Applied Across Columns?

sabledragonrook

New Member
Joined
Nov 9, 2015
Messages
7
Hello all! I can't quite figure out what I'm doing wrong here. I've got the value "250" in F21. Then in G21 through G25, I've got a number of values (this is all for a budget sheet, where 250 is the max allowed spending in a category and G21:G25 is all the purchases made in that category). I'm trying to make an IF statement that does "IF the SUM of G21:G25>250, change F21's cell color to red." To let me know we're over budget. However, I just can't get it to work, and I'm not sure why. Any ideas?

Thanks!
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,434
Office Version
365
Platform
Windows
You would use Conditional Formatting to do that.
Highlight cell cell F21, and use the following Conditional Formatting formula:
Code:
=SUM(G21:G25) > 250
and choose your red formatting.
 
Last edited:

sabledragonrook

New Member
Joined
Nov 9, 2015
Messages
7
You would use Conditional Formatting to do that.
Highlight cell cell F21, and use the following Conditional Formatting formula:
Code:
=SUM(G21:G25) > 250
and choose your red formatting.
Thanks! I've tried that already, but it's the actual conditional formatting box that I can't manage. It's Excel online (Sheets), and when I choose conditional formatting, it makes me choose a category that doesn't fit what I'm trying to do. If I use Custom, it comes up FALSE.

I'm probably missing something obvious. Thanks!
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,434
Office Version
365
Platform
Windows
It's Excel online (Sheets), and when I choose conditional formatting, it makes me choose a category that doesn't fit what I'm trying to do. If I use Custom, it comes up FALSE.
I would recommend including those details in the original question, so people know what you are dealing with.
What options does it give you?
 

sabledragonrook

New Member
Joined
Nov 9, 2015
Messages
7
I would recommend including those details in the original question, so people know what you are dealing with.
What options does it give you?
I have "apply to range" where I can select cells, then "Format Cells If" which I think is causing the problem, because then it gives me too-specific things like "value is greater than" and none of them fit me. But I don't know how to get around that/format the cell color without choosing conditional formatting.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,434
Office Version
365
Platform
Windows
I am a little. Aren't you trying to use Conditional Formatting?
Does Conditional Formatting give you a formula option?
 

sabledragonrook

New Member
Joined
Nov 9, 2015
Messages
7
I am a little. Aren't you trying to use Conditional Formatting?
Does Conditional Formatting give you a formula option?
No, that's what's confusing me too. It doesn't give me an option to put in a formula. It's like it's trying to make it simple, so that people who don't know how to write formulas can still do conditional formatting, but in doing so it's blocked me off from making my own conditional formatting. If you have Excel Sheets (the online version of Excel), open any spreadsheet and just click on Format > Conditional Formatting. That's where I am.

Basically, I can only choose from preset options, like "Cell value is greater than" instead of having the option to just type in a formula.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,434
Office Version
365
Platform
Windows
If you have Excel Sheets (the online version of Excel)
I am sorry, I do not have that, so I cannot see what you are looking at. So I am afraid I cannot be of much help with that.
Does Excel sheets allow VBA? If so, I can help you come up with some VBA that would accomplish the same task.
 

jessi81882

New Member
Joined
Jul 20, 2016
Messages
26
You should have an option for New Rule which is 3rd up from the bottom. Then in the window that opens the last option should be Use a Formula.....
 

sabledragonrook

New Member
Joined
Nov 9, 2015
Messages
7
Hello! I don't see an option for New Rule. Is that in the online version of Excel? I'm sorry, I don't know why this is so odd. Would it help anyone if I were to move this to Google Sheets?
 

Forum statistics

Threads
1,081,702
Messages
5,360,743
Members
400,595
Latest member
T_Dubs

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top