We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

How would you load up multiple Excel "IF" "THEN"?

Options
B0bbyEwing
B0bbyEwing Posts: 1,561 Forumite
1,000 Posts Second Anniversary Name Dropper
This is more a curiosity thing now as I've sussed how to do what I want to do, just it was a bit long winded & wanted to know how it should've been done or how it would've been better to be done if you get me?

To keep it simple...

A1 has a number
B1 has a number.

I wanted to create a rule so that if B1 was the same as A1 then basically they wouldn't change colour, if B1 was greater than A1 then B1 would change to one colour and if B1 was less than A1 then B1 would change to a second/different colour.

MS Office Pro Plus 2021.

What I did after a bit of Googling was click on B1, go to conditional formatting, go to New Rule, Use a formula to determine which cells to format & then in the box I set an IF-THEN formula - so let's say to turn B1 one colour.
What I didn't get from Googling was loading up additional IF-THENs so to do that I had to go in & set a new rule & use the other colour for the other rule I wanted.

Bit long winded.

How should it be written?

Comments

  • victor2
    victor2 Posts: 8,103 Ambassador
    Part of the Furniture 1,000 Posts Name Dropper
    Conditional formatting is very useful, but I think, as you conclude, that it would need two rules to achieve what you wanted. No need for an IF THEN formula, just the conditional expression to enable the specified format. You can then apply the rules to a range - but have to be wary of absolute references being the default in the expression. That's how it is in Excel 2010 anyway. :)

    I’m a Forum Ambassador and I support the Forum Team on the In My Home MoneySaving, Energy and Techie Stuff boards. If you need any help on these boards, do let me know. Please note that Ambassadors are not moderators. Any posts you spot in breach of the Forum Rules should be reported via the report button, or by emailing forumteam@moneysavingexpert.com. 

    All views are my own and not the official line of MoneySavingExpert.

  • B0bbyEwing
    B0bbyEwing Posts: 1,561 Forumite
    1,000 Posts Second Anniversary Name Dropper
    victor2 said:
    Conditional formatting is very useful, but I think, as you conclude, that it would need two rules to achieve what you wanted. No need for an IF THEN formula, just the conditional expression to enable the specified format. You can then apply the rules to a range - but have to be wary of absolute references being the default in the expression. That's how it is in Excel 2010 anyway. :)
    Not quite sure what you're saying tbh. Nothing against you there, I just don't understand it.

    I think you're saying there's no other way of doing what I want to do other than how I did it? So with my OP, I'm looking for something that doesn't exist in a way.

    If it's not that then what you said flew right over my head I'm afraid.
  • outtatune
    outtatune Posts: 748 Forumite
    500 Posts Third Anniversary Name Dropper
    edited 3 July 2023 at 9:26AM
    Conditional formatting is by definition IF ... THEN so by adding your own you're making things extra complicated.

Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.8K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.8K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.8K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.