+ Reply to Thread
Results 1 to 7 of 7

Problem in checking two columns using (if) pls help.....:(

  1. #1
    Registered User
    Join Date
    05-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    6

    Problem in checking two columns using (if) pls help.....:(

    hi,
    i have two discrete columns for e.g. A1 to A500 & B1 to B500 , now i want to check where A1 = b1,b2 b3 and to b500.
    similarly a2 a3 .... so on till a500.

    i tried using =IF(A1=(B1:B500),[TRUE],[FALSE])

    BUT IN VAIN KINDLY GUIDE so that i can sort this one out

  2. #2
    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,946

    Re: Problem in checking two columns using (if) pls help.....:(

    hi and welcome to the forum

    try this, copied down...
    =IF(A1=B1,TRUE,FALSE)
    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

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Problem in checking two columns using (if) pls help.....:(

    Perhaps try this formula in C1 copied down

    =COUNTIF(B$1:B$500,A1)>0
    Audere est facere

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Problem in checking two columns using (if) pls help.....:(

    Maybe this...

    =ISNUMBER(MATCH(A1,B$1:B$500,0))

    Copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    05-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Problem in checking two columns using (if) pls help.....:(

    Quote Originally Posted by Tony Valko View Post
    Maybe this...

    =ISNUMBER(MATCH(A1,B$1:B$500,0))

    Copy down as needed.

    thanks for the help it works can we change the colour of true or false one ????

  6. #6
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Problem in checking two columns using (if) pls help.....:(

    Quote Originally Posted by ammy.rocks View Post
    thanks for the help it works can we change the colour of true or false one ????
    Conditional Formatting
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Problem in checking two columns using (if) pls help.....:(

    Sure.

    Let's assume the data is in the range C1:C500.

    Select the *entire* range C1:C500 starting from cell C1.
    Cell C1 will be the active cell. The active cell is the
    one cell in the selected range that is not shaded. The
    formula will be relative to the active cell.

    Goto the Home tab>Styles>Conditional Formatting>
    Manage rules>New rule>Use a formula to determine
    which cells to format

    Enter this formula in the box below:

    =C1=TRUE

    Click the Format button
    Select the desired style(s)

    OK
    OK

    New rule>Use a formula to determine
    which cells to format

    Enter this formula in the box below:

    =C1=FALSE

    Click the Format button
    Select the desired style(s)
    OK out

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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