+ Reply to Thread
Results 1 to 9 of 9

Extract data from one sheet and write to the second sheet.

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Extract data from one sheet and write to the second sheet.

    Hello, I have a workbook which has two sheets. I want to extract data from sheet1 and write them to sheet2. The rule: if you look at sheet2, the first column is extract from the first column in sheet1. And the first row in sheet2 is also extracted from the first row in sheet1. Most cells in sheet2 are empty. I want the values be filled respectively.

    File is attached. Thanks for help.
    Attached Files Attached Files
    Last edited by zhshqzyc; 03-02-2011 at 06:08 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract data from one sheet and write to the second sheet.

    Try, in B2:

    =LOOKUP(9.999999E+207,CHOOSE({1,2},0,INDEX(Sheet1!$A:$HF,MATCH($A2,Sheet1!$A:$A,0),MATCH(B$1,Sheet1!$A$1:$HF$1,0))))

    copied across the matrix.

    A 0 is returned when no match found... to hide the 0's format the cells as Custom: 0;-0;;@
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: Extract data from one sheet and write to the second sheet.

    It looks wrong. Any VBA for it?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract data from one sheet and write to the second sheet.

    What looks wrong... please explain.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: Extract data from one sheet and write to the second sheet.

    Okay. Maybe my fault. Thanks. hmm

  6. #6
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: Extract data from one sheet and write to the second sheet.

    One thing, I have to point out. Can you consider string case sensitive?
    For example,
    Please Login or Register  to view this content.
    Thay are in different sheets.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract data from one sheet and write to the second sheet.

    So you want to match case or you don't care what the case is?

  8. #8
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: Extract data from one sheet and write to the second sheet.

    Could you please perform a case sensitive lookup? I am not familar with it. Thanks.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract data from one sheet and write to the second sheet.

    I think this seems to do it.

    In B2,

    Please Login or Register  to view this content.
    copied down and across

+ 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