+ Reply to Thread
Results 1 to 5 of 5

Thread: IF column A = B comment but skip non blanks

  1. #1
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    198

    IF column A = B comment but skip non blanks

    Hi all, is there a way to put below logic:

    1) If number in column A = # in column B then in column C comment "OK"
    2) next I would drag the formula down for thousand rows, but I want it to not overwrite if something is in column C already, basically populate comment "OK" only for blank cells

    Any help is much appreciated

    thanks so much

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    MS Office Excel 2007
    Posts
    841

    Re: IF column A = B comment but skip non blanks

    in column D
    =IF(C1<>"",C1,IF(A1=B1,"OK",""))

    Copy column D
    Paste values back over column D

    Now delete column C if you like as column D is the result you wanted
    Regards
    Special-K

    I rarely return to a problem once I've answered it so make sure you clearly define what the trouble is.

  3. #3
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,228

    Re: IF column A = B comment but skip non blanks

    To skip any cells that currently have something in them...

    1) Enter your formula in the first cell
    2) Copy that cell
    3) Highlight the full range of cells downward
    4) Press F5, click on Special > Blanks > OK
    5) Press Ctrl-Enter
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: IF column A = B comment but skip non blanks

    hmm =IF(C1<>"",C1,IF(A1=B1,"OK","")) does not work..just returns blank cells.. should this work in excel 2003?

  5. #5
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,228

    Re: IF column A = B comment but skip non blanks

    Quote Originally Posted by JBeaucaire View Post
    To skip any cells that currently have something in them...

    1) Enter your formula in the first cell
    2) Copy that cell
    3) Highlight the full range of cells downward
    4) Press F5, click on Special > Blanks > OK
    5) Press Ctrl-Enter
    Using this technique, the formula I would use in C1 (for step #1 above) is:

    =IF(AND(A1<>"", A1=B1), "OK", "")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0