+ Reply to Thread
Results 1 to 7 of 7

Transfer values from sht1 to sht2(skipping some sht1 values)

  1. #1
    Registered User
    Join Date
    10-16-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    31

    Post Transfer values from sht1 to sht2(skipping some sht1 values)

    Hi Gurus'
    I have two sheets, sheet1 and sheet2, and I want to compare "desc" of both sheets & then transfer sheet1 & sheet2's common desc's "amt" values to sheet2.
    e.g. "a" is common to both sheets so transfer a's amt i.e. "1" to sheet2's "a amt" and so on. Also if there is already an amt present in sheet2 amt field, then add the old and new amt and display just the sum of both amnts.
    Attached excel says it all.
    P.S. I was trying to build a macro myself but wasnt successfull.

    Thanks,
    Ravin
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Transfer values from sht1 to sht2(skipping some sht1 values)

    Could use this macro:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Registered User
    Join Date
    10-16-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    31

    Thumbs up Re: Transfer values from sht1 to sht2(skipping some sht1 values)

    Hi Ricardo,

    You are bang on target, but my mistake in giving you the sample sheet.
    your macro works perfectly as per the scenario given by me, but I forgot something to add to the 2nd sheet, which I have done now, it just that the "desc" cells have 2 extra chars. preceding them, so how do I change your macro for them.
    I tried left & right(), but not quite getting them right..
    Attaching the excel again..
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Transfer values from sht1 to sht2(skipping some sht1 values)

    Simple change:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-16-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    31

    Thumbs up Re: Transfer values from sht1 to sht2(skipping some sht1 values)

    Perfect Ricardo,
    Actually I achieved it using this
    Please Login or Register  to view this content.
    But your seems to be much simpler...

    Thanks for all your timely and accurate help....really appreciate it...

  6. #6
    Registered User
    Join Date
    10-16-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    31

    Lightbulb Re: Transfer values from sht1 to sht2(skipping some sht1 values)

    Quote Originally Posted by rwgrietveld View Post
    Simple change:
    Please Login or Register  to view this content.
    Hi Ricardo,

    Just one more small help...
    In the attached excel(yours), I have another long table besides the small(original table), from which also I wanted to compare the values and pick up certain values from next column, and copy / add that value to another sheets value.
    I am able to do all this, but there is a small problem.
    Actually, I am defining the named range for the long table by selecting the entire column, so the macro a looooooooong time to search, compare & copy /add the values(obviously, it has to search 65K odd rows.), so I want you to modify the attached macro, to define a named range & search till last row of the long table(which may be at row100, or 200 or 300, since the long table is formed dynamically, thru another macro.)

    Attaching the excel with modified macro for the long table...

    Thanks,
    Ravin
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-16-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Transfer values from sht1 to sht2(skipping some sht1 values)

    Ricardo,
    Can you please reply to my earlier question?

    Thanks,
    Ravin

+ 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