We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 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!

Excel help

I have Excel 2007 and am trying to achieve the follow with rows of numbers.

If a number exists in previous row, highlight in a different colour.

Now I know of COUNTIF and conditional formatting but can't quite figure how to put the two together. Or is there a different way?

Comments

  • Given you are using the row above to highlight the row below and assuming the data is in A1->L200 then....

    Highlight A2->L200. Click conditional formatting, New Rule, Use a Formula
    and enter:

    =MATCH(123456,$A1:$L1,0)>0

    Where 123456 is the number you want it to look for
  • OneADay
    OneADay Posts: 9,031 Forumite
    1,000 Posts Combo Breaker
    Not quite working for me.
    Its either highlighting nothing or a whole column or row gets highlighted.

    I want formula lookup value to vary - so if I set it like this then it will change to look A2, A3 depending on each sell

    =MATCH(A1,$A1:$L1,0)>0

    But even using

    =MATCH(1,$A1:$L1,0)>0

    does not seem to be working at moment - using just 4 rows of data - columns A to L
  • If its cell by cell then its easier, as above in terms of area to select and conditional funding but the formula is

    =A1=A2
  • OneADay
    OneADay Posts: 9,031 Forumite
    1,000 Posts Combo Breaker
    Something is not working then.
    If I just look at result of MATCH(A1,$A1:$L4,0), its coming back with N/A.
  • No, its simply

    =A1=A2

    In the conditional formatting formula

    The Match() was being used to highlight rows as I thought you want it so that if any cell in the row above had a set value. The function returns the position of the first match or an n/a if there is no match
This discussion has been closed.
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
  • 351.7K Banking & Borrowing
  • 253.4K Reduce Debt & Boost Income
  • 454K Spending & Discounts
  • 244.7K Work, Benefits & Business
  • 600.1K Mortgages, Homes & Bills
  • 177.3K Life & Family
  • 258.4K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K 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.