To see less ads Register or Login ----- Daily Fantasy Sports games 18+

Conditional formatting help reqd!

A forum to discuss or share knowledge of spreadsheets.
User avatar
Jester
Sir Jedi Jesterlot
Posts: 25201
Joined: 13 Oct 2005, 18:28
Location: Back at FISODAS Tower!
FS Record: TFC 2008 T20 winner; EggCup Div 1 06/07; Two-Foot Cup 2018; S4 EPL Cup 2020
Contact:

Conditional formatting help reqd!

Post by Jester »

Right, hope someone can guide me here....?

I an using CF to highlight a cell if the date in it is more than a year old:

I'm using: Conditional formatting => New rule => 'use a formula to determine which cells to format'

The formatting rule being "=A1<=TODAY()-365"
Then select the cell format etc


What I want to do is to add another condition so that the cell is only formatted if a certain value is found in an adjacent cell, eg if A4 contains 'PAID' then A1 should be formatted if over a year old. If A4 is clear, then A1 should not be formatted.


Hope that makes sense!

I'm happy to approach this in a completely different way if there is one but I don't really have room on the sheet to enter formulae, hence using CF.


Thanks a bunch!

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

You should be able to use AND as the formula

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

Try this:
Say the date is in col A and paid is in Col B and starts in row 3

In C3 put this formula:
=IF(AND(B3="Paid",A3<=TODAY()-365),1,0)

The CF for col A is
=C3

User avatar
Jester
Sir Jedi Jesterlot
Posts: 25201
Joined: 13 Oct 2005, 18:28
Location: Back at FISODAS Tower!
FS Record: TFC 2008 T20 winner; EggCup Div 1 06/07; Two-Foot Cup 2018; S4 EPL Cup 2020
Contact:

Re: Conditional formatting help reqd!

Post by Jester »

Thank you - will try it tomorrow :-)

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

In fact you can put that formula in the CF formula box and it works to so no need for any extra coloumn

User avatar
Jester
Sir Jedi Jesterlot
Posts: 25201
Joined: 13 Oct 2005, 18:28
Location: Back at FISODAS Tower!
FS Record: TFC 2008 T20 winner; EggCup Div 1 06/07; Two-Foot Cup 2018; S4 EPL Cup 2020
Contact:

Re: Conditional formatting help reqd!

Post by Jester »

Surprised wrote:In fact you can put that formula in the CF formula box and it works to so no need for any extra coloumn


Now that's what I wanted! :D

User avatar
unc.si.
FISO Knight
Posts: 11815
Joined: 11 Oct 2010, 14:08
Location: Off to buy Loctite
FS Record: 'Loser' by Beck

Re: Conditional formatting help reqd!

Post by unc.si. »

You won't need the If statement if you put it into the conditional formatting wizard. Excel does that bit for you.

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

unc.si. wrote:You won't need the If statement if you put it into the conditional formatting wizard. Excel does that bit for you.

I don't have the wizard

User avatar
unc.si.
FISO Knight
Posts: 11815
Joined: 11 Oct 2010, 14:08
Location: Off to buy Loctite
FS Record: 'Loser' by Beck

Re: Conditional formatting help reqd!

Post by unc.si. »

Oh OK. Wouldn't know how to do it without using the conditional formatting button to add a rule.

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

unc.si. wrote:Oh OK. Wouldn't know how to do it without using the conditional formatting button to add a rule.
I had a look around
Conditional Sum Wizard add-in

This add-in is no longer included with Excel 2010. In earlier versions of Excel, you could use the Conditional Sum Wizard to help you write formulas that calculate the sums of values that met specified conditions. In Excel 2010, you can write conditional formulas by using functions that are designed to help with that task, such as the SUMIF and SUMIFS functions.

Formulas that were generated by this wizard will continue to work in Excel 2010. You can edit them by using other methods.

User avatar
unc.si.
FISO Knight
Posts: 11815
Joined: 11 Oct 2010, 14:08
Location: Off to buy Loctite
FS Record: 'Loser' by Beck

Re: Conditional formatting help reqd!

Post by unc.si. »

Looks like I'm just living in the past then :D

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

Yep.
2010 is the future

User avatar
unc.si.
FISO Knight
Posts: 11815
Joined: 11 Oct 2010, 14:08
Location: Off to buy Loctite
FS Record: 'Loser' by Beck

Re: Conditional formatting help reqd!

Post by unc.si. »

I'm on Excel 2013.

Your quote relates to conditional sum not conditional formatting.

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

So I see :oops: .
But I still don't have Conditional Format wizard and admit I never heard of conditional sum wizard. I just type formulas.

How do you access the wizard?

User avatar
unc.si.
FISO Knight
Posts: 11815
Joined: 11 Oct 2010, 14:08
Location: Off to buy Loctite
FS Record: 'Loser' by Beck

Re: Conditional formatting help reqd!

Post by unc.si. »

'Wizard' might be a misnomer (I tend to call anything that doesn't just involve typing in a formula yourself a wizard).

I just mean the conditional formatting button on the home ribbon, ie conditional formatting / new rule, then 'use a formula'. The 'use a formula' then brings up a box to type in, but it effectively does the 'IF' bit for you. You just enter the formula that you want evaluating (without the need for the IF statement) and then hit the format button to set the formatting if that statement is true.

Don't know any other way of doing it without writing some vba code (which would just be duplicating the code that excel uses for the conditional formatting button).

Only mentioned it because if jester used the conditional formatting button and included the IF statement he'd (probably) get an error.

User avatar
unc.si.
FISO Knight
Posts: 11815
Joined: 11 Oct 2010, 14:08
Location: Off to buy Loctite
FS Record: 'Loser' by Beck

Re: Conditional formatting help reqd!

Post by unc.si. »

Oh - I've never heard of a conditional sum wizard either. Can't imagine anyone would need a 'wizard' to help with a sumif or sumifs statement. Probably why they scrapped it :D

User avatar
WilBert
Dumbledore
Posts: 7767
Joined: 28 Dec 2009, 21:07
Location: 2nd in SP4's Ashes comp.

Re: Conditional formatting help reqd!

Post by WilBert »

unc.si. wrote:'Wizard' might be a misnomer (I tend to call anything that doesn't just involve typing in a formula yourself a wizard).

I just mean the conditional formatting button on the home ribbon, ie conditional formatting / new rule, then 'use a formula'. The 'use a formula' then brings up a box to type in, but it effectively does the 'IF' bit for you. You just enter the formula that you want evaluating (without the need for the IF statement) and then hit the format button to set the formatting if that statement is true.

Don't know any other way of doing it without writing some vba code (which would just be duplicating the code that excel uses for the conditional formatting button).

Only mentioned it because if jester used the conditional formatting button and included the IF statement he'd (probably) get an error.
That's the way I do it too, mess around with if formulas for 5 hours to get it to work stick it in the conditional formula box then sit back with some satisfaction looking at the work of art before realising I'm going to have to work late to finish my proper job. :wink:

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

Oh OK.
Then I have it. Yeah...you don't need the IF part if it's just one condition as IF is the rule but if checking multiple conditions then you need to put in the full formula (IF+AND in this case). Multiple IFs or IFORs can just be done with a bunch of rules

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

unc.si. wrote:Oh - I've never heard of a conditional sum wizard either. Can't imagine anyone would need a 'wizard' to help with a sumif or sumifs statement. Probably why they scrapped it :D

I have a feeling it was used with named ranges and may have been of limited use to some especially if all they could do was add up a list of numbers. Probably more trouble than it was worth.

User avatar
WilBert
Dumbledore
Posts: 7767
Joined: 28 Dec 2009, 21:07
Location: 2nd in SP4's Ashes comp.

Re: Conditional formatting help reqd!

Post by WilBert »

I'd also have no physical and mental control of myself - I'd have to make the cell orange 2 weeks before it becomes a year old. :oops:

User avatar
unc.si.
FISO Knight
Posts: 11815
Joined: 11 Oct 2010, 14:08
Location: Off to buy Loctite
FS Record: 'Loser' by Beck

Re: Conditional formatting help reqd!

Post by unc.si. »

Surprised wrote:Oh OK.
Then I have it. Yeah...you don't need the IF part if it's just one condition as IF is the rule but if checking multiple conditions then you need to put in the full formula (IF+AND in this case). Multiple IFs or IFORs can just be done with a bunch of rules
You just need the AND(condition 1, condition 2, etc)

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

WilBert wrote:I'd also have no physical and mental control of myself - I'd have to make the cell orange 2 weeks before it becomes a year old. :oops:
Or keep refreshing the spreadsheet to see the exact moment the cell changes colour.

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

unc.si. wrote:
Surprised wrote:Oh OK.
Then I have it. Yeah...you don't need the IF part if it's just one condition as IF is the rule but if checking multiple conditions then you need to put in the full formula (IF+AND in this case). Multiple IFs or IFORs can just be done with a bunch of rules
You just need the AND(condition 1, condition 2, etc)

OK. I didn't bother checking that. Still works with the IF but just checked without it and it didn't format

User avatar
Jester
Sir Jedi Jesterlot
Posts: 25201
Joined: 13 Oct 2005, 18:28
Location: Back at FISODAS Tower!
FS Record: TFC 2008 T20 winner; EggCup Div 1 06/07; Two-Foot Cup 2018; S4 EPL Cup 2020
Contact:

Re: Conditional formatting help reqd!

Post by Jester »

The thread's gone viral! :shock:


And I haven't even had a chance to try it yet....... Tonight! :)

User avatar
Jester
Sir Jedi Jesterlot
Posts: 25201
Joined: 13 Oct 2005, 18:28
Location: Back at FISODAS Tower!
FS Record: TFC 2008 T20 winner; EggCup Div 1 06/07; Two-Foot Cup 2018; S4 EPL Cup 2020
Contact:

Re: Conditional formatting help reqd!

Post by Jester »

Surprised wrote:In fact you can put that formula in the CF formula box and it works to so no need for any extra coloumn



This works well thank you :-)


Just one small thing.........
If the date cell is blank the CF thinks it is more than a year ago and formats the cell. I'm not sure if this is a good thing or not, but can I stop it happening if I want to?

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

Jester wrote:
Surprised wrote:In fact you can put that formula in the CF formula box and it works to so no need for any extra coloumn



This works well thank you :-)


Just one small thing.........
If the date cell is blank the CF thinks it is more than a year ago and formats the cell. I'm not sure if this is a good thing or not, but can I stop it happening if I want to?

Just put a date in that's less than a year?

User avatar
Jester
Sir Jedi Jesterlot
Posts: 25201
Joined: 13 Oct 2005, 18:28
Location: Back at FISODAS Tower!
FS Record: TFC 2008 T20 winner; EggCup Div 1 06/07; Two-Foot Cup 2018; S4 EPL Cup 2020
Contact:

Re: Conditional formatting help reqd!

Post by Jester »

Hahaha - didn't think of that!!

Rather I meant how to stop a blank cell being highlighted? :-)



I actually think it's good the way it is - highlights if a date has been missed. Just in case it gets confusing to others that I asked.

No worries if it can't be done.

User avatar
Surprised
FISO Jedi Knight
Posts: 26528
Joined: 13 Oct 2005, 18:32
Location: Home
FS Record: TFFOSM MotW in 2008 and MotM in 2003. 78th overall in TFFO for 2002/3 and 2003/4

Re: Conditional formatting help reqd!

Post by Surprised »

I'm sure it can be done.
May need to add a second rule or make adjustments to the formula.
I'll look tomorrow

User avatar
Rob
Grumpy Old Man
Posts: 3639
Joined: 24 Jul 2009, 10:54
Location: Poster formerly known as SOBD
FS Record: WC2010 FISODAS Champion!!

Re: Conditional formatting help reqd!

Post by Rob »

Using Surprised's example formula, it would become:

=IF(AND(B3="Paid",NOT(ISBLANK(A3)),A3<=TODAY()-365),1,0)

User avatar
Jester
Sir Jedi Jesterlot
Posts: 25201
Joined: 13 Oct 2005, 18:28
Location: Back at FISODAS Tower!
FS Record: TFC 2008 T20 winner; EggCup Div 1 06/07; Two-Foot Cup 2018; S4 EPL Cup 2020
Contact:

Re: Conditional formatting help reqd!

Post by Jester »

Thank you! :-)

View Latest: 1 Day View Your posts
Post Reply

Return to “Spreadsheets”