+ Reply to Thread
Results 1 to 13 of 13

Copy Cell Info If Condition Is Met

  1. #1
    Registered User
    Join Date
    12-12-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Copy Cell Info If Condition Is Met

    I have an Excel file with 2 worksheets. Sheet1 Column A contains a list of random numbers, Sheet2 Column C also contains a list of random numbers. On Sheet1 Column D, I would like to automatically copy information into this column of cells from Sheet2 Column J (corresponding value) if the row value for any given cell on Sheet1 Column A matches Sheet2 Column C. I've tried VLookUp and a couple of other formulas but no luck so far. Any help/advice would be greatly appreciated.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Copy Cell Info If Condition Is Met

    In cell C2 of sheet1, try:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Copy Cell Info If Condition Is Met

    Try this.....

    On sheet1

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    12-12-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Copy Cell Info If Condition Is Met

    ConneXionLost..... almost there. I modified the formula to =IF(COUNTIF(StationProduction_BP!$B$8:$C$150,A2),VLOOKUP(A2,StationProduction_BP!C:J,8,0),"") (StationProuction_BP is Sheet2) and it appears to identify which rows on Sheet1 & 2 Column A & C have corresponding equal values. However, itstead of placing the corresponding value of Sheet2 Column J, it just lists #N/A. Any ideas/suggestions?

  5. #5
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Copy Cell Info If Condition Is Met

    How about:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-12-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Copy Cell Info If Condition Is Met

    Same result I know it's close. Just not quite there.

  7. #7
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Copy Cell Info If Condition Is Met

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  8. #8
    Registered User
    Join Date
    12-12-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Copy Cell Info If Condition Is Met

    Attached is a sample of the file that I am working with. Data on EMP_Data Column C should equal the data on StationProduction_BP Column J where cell data in Column A EMP_Data equals cell data in Column B StationProduction_BP. Examples of wanted return data are given in Column E EMP_data. Thanks for your help. All_Prod(1).xlsx

  9. #9
    Registered User
    Join Date
    12-12-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Copy Cell Info If Condition Is Met

    Please disregard the earlier attachment. This is the correct attachment.All_Prod(2).xlsx

  10. #10
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Copy Cell Info If Condition Is Met

    The array on Sheet2 begins in column B, not C as you had previously stated. In cell E7 of Sheet1, try this:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    12-12-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Copy Cell Info If Condition Is Met

    Outstanding. Thanks so much, ConneXion... and I am sorry for my error.

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

    Re: Copy Cell Info If Condition Is Met

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    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]

  13. #13
    Registered User
    Join Date
    12-12-2013
    Location
    Little Rock, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Copy Cell Info If Condition Is Met

    Thanks. I will definitely keep that in mind.

+ 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. Replies: 8
    Last Post: 06-27-2013, 05:51 PM
  2. Replies: 5
    Last Post: 06-01-2012, 05:04 PM
  3. Copy info on condition
    By bouitac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2009, 11:56 AM
  4. Replies: 1
    Last Post: 11-16-2008, 10:42 AM
  5. Copy info from 1 cell to another?
    By Dallas21 in forum Excel General
    Replies: 8
    Last Post: 03-26-2008, 10:25 AM

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