+ Reply to Thread
Results 1 to 10 of 10

Highlight cell A2 and A1 are not equal (not the usual!)

  1. #1
    Registered User
    Join Date
    10-10-2015
    Location
    Freedom, America
    MS-Off Ver
    Office 365 Mac 2016, Office H&B 2013
    Posts
    5

    Question Highlight cell A2 and A1 are not equal (not the usual!)

    Hello all

    I am doing a spreadsheet for my company, in which there are 2 sheets.
    Sheet 1 contains information from a CSV file.
    Sheet 2 is the "formatted" version of that first sheet, with only selective information taken and manipulated.
    The reason why I've done this is irrelevant to my question so please do not address it, except in direct context.

    The values of sheet 2 are determined by the first with links, i.e. ='Sheet 1'!Z1

    In this second sheet I want to highlight the cell A2 when it is NOT equal to A1.
    I would normally do this using Condition Formatting > Determine by formula > =A2<>A1 then select a colour.

    However this does not work in this case because the actual value of A1 is the link (='Sheet 1'!Z1)

    So, how would I go about highlighting the cells that I want?
    Is excel just not smart enough to do this?
    I am not particularly interested in using scripts, so please don't spend a bunch of time writing a massive script I'm not going to use :)

    I have looked at alternatives like creating a third column and simply writing IF statements, but this does not work for the project.
    Interestingly, if I do create a third column and type =A1 into it, the conditional formatting works, despite A1 still being a link.


    Many thanks in advance,
    John.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    Hi, and welcome to the forum.

    Without seeing the actual workbook I obviously can't comment with certainty. Usually when two numbers look the same but a formula treats them as being different it's because at a very low precision level they aren't the same. e.g. one number might be say 1.0 and the other 1.000000000001. And the usual solution to this is to use say an =ROUND(A1,5) function.

    However upload the workbook so that we may see the result in context,.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-10-2015
    Location
    Freedom, America
    MS-Off Ver
    Office 365 Mac 2016, Office H&B 2013
    Posts
    5

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    Ah I see. Here is a link to download the spreadsheet.
    http://cl.ly/dUOp

    EDIT: sorry, I forgot to say what's what in relation to my general post above.
    So CPU is Sheet 1, '~CPU~' is Sheet 2, A1 is the unitCost column and A2 is the Cost Ex (manual) column.
    Last edited by 301; 10-10-2015 at 06:22 AM.

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    Hi
    Use this formula in conditional formating
    =F2<>INDEX('~CPU~'!$D$2:$D$20,MATCH(B2,'~CPU~'!$A$2:$A$20,0))
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    See the file Parts List Export.xlsx
    Regards

  6. #6
    Registered User
    Join Date
    10-10-2015
    Location
    Freedom, America
    MS-Off Ver
    Office 365 Mac 2016, Office H&B 2013
    Posts
    5

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    Can you explain what i'm looking at here?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    301 Please upload your file to the forum. Not all members are able - or willing - to access file-hosting sites
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Registered User
    Join Date
    10-10-2015
    Location
    Freedom, America
    MS-Off Ver
    Office 365 Mac 2016, Office H&B 2013
    Posts
    5

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    Alright, I've attached the file to the post. Here is my original question, just updated to be specific now that I'm uploading the file.


    Hello all

    I am doing a spreadsheet for my company, in which there are 2 sheets.
    The first sheet, CPU contains information from a CSV file.
    The second sheet, ~CPU~ is the "formatted" version of that first sheet, with only selective information taken and manipulated.
    The reason why I've done this is irrelevant to my question so please do not address it, except in direct context.

    The values of the sheet ~CPU~ are determined by the first with links, i.e. =CPU!F2

    In this second sheet I want to highlight the cell D2 when it is NOT equal to C1.
    I would normally do this using Conditional Formatting > Determine by formula > =D2<>C2 then select a colour.

    However this does not work in this case because the actual value of C1 is the link (=CPU!F2)

    So, how would I go about highlighting the cells that I want?
    Is excel just not smart enough to do this?
    I am not particularly interested in using scripts, so please don't spend a bunch of time writing a massive script I'm not going to use

    I have looked at alternatives like creating a third column and simply writing IF statements, but this does not work for the project.
    Interestingly, if I do create a third column and type =C1 into it, the conditional formatting works, despite C1 still being a link.

    Many thanks in advance,
    John.
    Attached Files Attached Files
    Last edited by 301; 10-11-2015 at 06:13 AM.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    Hi,

    It works fine for me - see attached
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-10-2015
    Location
    Freedom, America
    MS-Off Ver
    Office 365 Mac 2016, Office H&B 2013
    Posts
    5

    Re: Highlight cell A2 and A1 are not equal (not the usual!)

    Absolute legend mate, thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] If cell D3 equals X and P3 doesnt equal 'z' highlight it
    By Suffolkhousing in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-16-2014, 08:43 AM
  2. [SOLVED] Highlight specific cells if any of them equal any 25 names
    By Triscia in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-11-2014, 02:53 PM
  3. [SOLVED] Highlight a cell based on another cell being equal
    By PomDave in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2014, 04:31 AM
  4. Highlight a text within a cell against an equal text in another cell.
    By fabdullaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2013, 03:27 PM
  5. [SOLVED] Cond. Formatting - highlight cell w/value if equal value in list
    By Armitage2k in forum Excel General
    Replies: 3
    Last Post: 10-16-2012, 12:25 AM
  6. Highlight Row If Equal to Today's Date
    By Kumara_faith in forum Excel General
    Replies: 2
    Last Post: 02-03-2010, 09:54 PM
  7. [SOLVED] want highlight when all cells in range are equal
    By Jane in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-15-2005, 10:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1