+ Reply to Thread
Results 1 to 8 of 8

How to create/run "cell A equals Cell B put Cell C info in Cell D

  1. #1
    abmb161
    Guest

    How to create/run "cell A equals Cell B put Cell C info in Cell D

    I need to match data in cell A to cell B and then if they equal I need to
    copy the adjacent cell C to cell X . How do I set up a macro to do this
    automatically? I have over 5000 cells to compare and match up.. Can anyone
    help? I have Office 2003.

  2. #2
    vezerid
    Guest

    Re: How to create/run "cell A equals Cell B put Cell C info in Cell D

    You can do it with a formula. In X1 you type

    =IF(A1=B1, C1, "")

    And you copy down as far as necessary.

    Does this help?
    Kostis Vezerides


  3. #3
    Jonathan Cooper
    Guest

    RE: How to create/run "cell A equals Cell B put Cell C info in Cell D

    Does it have to be a macro? You could just put an IF statement into column
    X, that says =if(exact(A1,B1),C1,""). Copy/paste the formula down. Then
    autofilter or advanced filter the results.

    "abmb161" wrote:

    > I need to match data in cell A to cell B and then if they equal I need to
    > copy the adjacent cell C to cell X . How do I set up a macro to do this
    > automatically? I have over 5000 cells to compare and match up.. Can anyone
    > help? I have Office 2003.


  4. #4
    Gary''s Student
    Guest

    RE: How to create/run "cell A equals Cell B put Cell C info in Cell D

    In cell Z1 enter:

    =IF(A1=B1,C1,"")
    and then copy down
    --
    Gary's Student


    "abmb161" wrote:

    > I need to match data in cell A to cell B and then if they equal I need to
    > copy the adjacent cell C to cell X . How do I set up a macro to do this
    > automatically? I have over 5000 cells to compare and match up.. Can anyone
    > help? I have Office 2003.


  5. #5
    Registered User
    Join Date
    01-05-2006
    Posts
    65
    In cell X1 put

    =IF(A1=B1,C1,[whatever happens if A1 and B1 are not the same]

    copy down as needed

  6. #6
    OZDOC1050
    Guest

    Re: How to create/run "cell A equals Cell B put Cell C info in Cell D

    Sub CTOX()
    Application.ScreenUpdating = False
    Range("A1").Select
    Do Until ActiveCell.Value = ""
    If ActiveCell.Value = ActiveCell.Offset(0, 1).Value Then
    ActiveCell.Offset(0, 23).Value = ActiveCell.Offset(0, 2).Value
    End If
    ActiveCell.Offset(1, 0).Select
    Loop
    Range("A1").Select
    Application.ScreenUpdating = True
    End Sub

    This is if all 5000 in the column A are together with no breaks, it can be
    adjusted to suit if there are breaks.

    R
    Pete

    --
    (][ THIS EMAIL HAS BEEN SCANNED BY NORTON ANTIVIRUS ][)
    "abmb161" <[email protected]> wrote in message
    news:[email protected]...
    >I need to match data in cell A to cell B and then if they equal I need to
    > copy the adjacent cell C to cell X . How do I set up a macro to do this
    > automatically? I have over 5000 cells to compare and match up.. Can anyone
    > help? I have Office 2003.




  7. #7
    Registered User
    Join Date
    02-04-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to create/run "cell A equals Cell B put Cell C info in Cell D

    I have kind of a similar question so no need to create a new topic.

    I'm not looking for a formula, but for a macro.
    I kind of need a "if column A equals B, then C is 0".
    Rows A and B are completely different, but B and C are related.

    Example:

    A / B / C
    10 10 1
    20 30 1
    30 40 1
    50 60 1

    In this case 10 and 30 should get a zero in column C.

    A / B / C
    10 10 0
    20 30 0
    30 40 1
    50 60 1

    edit: It would be great if someone could help me out!
    Last edited by hayman; 02-04-2014 at 04:39 PM.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to create/run "cell A equals Cell B put Cell C info in Cell D

    hayman,

    Welcome to the forum.

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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.6.0 RC 1