+ Reply to Thread
Results 1 to 8 of 8

pick data from first sheet & update other sheets.

  1. #1
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Post pick data from first sheet & update other sheets.

    dear friends here i have attached my document.first sheet is my data base.second & thread sheets are my packing reports.when enter to data second & thread sheet column "F" according to that data Column "A" to "E" rows need to fill.that data need to pick from first sheet.i have try vlookup formulas.but it's not giving correct answer for me.pls any can make VB code for this.thanks a lot.
    Attached Files Attached Files
    Last edited by johncena; 04-22-2010 at 03:58 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: pick data from first sheet & update other sheets.

    VLOOKUP() requires that the search value be found in the first column of the data range. Since your data range is A:M, then that would be column A. Obviously your layout doesn't support that, so you can't use VLOOKUP unless you move the lot # to the first column.

    Do you want to do that? If you do your VLOOKUP() will work then.

    If not, you'll need to use INDEX/MATCH instead. In B5, for instance:
    =INDEX('Order History'!H:H, MATCH($F5, 'Order History'!$M:$M, 0))

    (you would need to change F5 to text, or the values in OrderHistory!M:M to numbers)
    Attached Files Attached Files
    Last edited by JBeaucaire; 04-22-2010 at 03:08 AM.
    _________________
    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!)

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: pick data from first sheet & update other sheets.

    See attached file, I hope it's what you need.
    I added this macro on sheets Day and Night:
    Please Login or Register  to view this content.
    and this macro on Module1
    Please Login or Register  to view this content.
    Regards,
    Antonio
    Attached Files Attached Files
    Last edited by antoka05; 04-22-2010 at 03:27 AM.

  4. #4
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: pick data from first sheet & update other sheets.

    thanks for your help JB.antoka05 VB code work very well.i need small modification.some time that lot numbers cumming like this.
    ex- first sheet column "M" (LOT#) - 125467A-C
    that mean 3 lots are there (A,B & C)
    that packing sheets it's entering like this.
    125467A
    125467B
    125467C
    in this case antoka05 VB code not working.in this case we have to match only first 6 characters.if we match whole cell values it's not work.pls make this change.thanks a lot....

  5. #5
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: pick data from first sheet & update other sheets.

    I modified code matching only first 6 characters.
    If you need to verify that the final letters of lot# in first sheet matching with the letters entered on other sheets please tell me.
    Regards,
    Antonio
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Post Re: pick data from first sheet & update other sheets.

    WOW thanks a lot antoka05.it's 200% working.now my problem is solved.this part not clear for me.
    Please Login or Register  to view this content.
    thanks a lot again.REP+

  7. #7
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: pick data from first sheet & update other sheets.

    What I wanted to tell it''s:
    for example, if you have code 123456A-C in first sheet and you want it only matches with codes from 123456A to 123456C and not, for example, with 123456D or 123456F etc. I need to modify the code to verify also the comparison of letters and not only match with first 6 characters.
    Regards,
    Antonio

  8. #8
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: pick data from first sheet & update other sheets.

    dear Antonio.thanks a lot for your kind & cooperation.this is enough for me.thanks a lot again.

+ 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