+ Reply to Thread
Results 1 to 7 of 7

Macro - Taking the value of a cell and finding it on another sheet

  1. #1
    Registered User
    Join Date
    04-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro - Taking the value of a cell and finding it on another sheet

    Hi,

    I have searched Google but cannot locate an answer.

    I have a workbook, one worksheet has "house numbers" which are for example 1550 - This would change each day
    I need the macro to look in cell A7 to take the value (whatever it may be) and find it on the other worksheet, and then copy and paste values in cell A8/A9/A10 into worksheet 2

    I would need this to repeat on the next row untill no further data.

    Any ideas?

    Please Login or Register  to view this content.
    Last edited by royUK; 04-25-2012 at 10:00 AM. Reason: amend code tags

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro - Taking the value of a cell and finding it on another sheet

    Please use Code tags not Quote tags, I've changed them this time.
    Last edited by royUK; 04-25-2012 at 10:06 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro - Taking the value of a cell and finding it on another sheet

    It depends how the data is laid out but you should be able to use VLOOKUP

  4. #4
    Registered User
    Join Date
    06-06-2011
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Macro - Taking the value of a cell and finding it on another sheet

    I am looking for an answer to this question too. Vlookup is great for a handful of items or for a few columns, but with hundreds of columns and thousands of rows, this is far too complicated. Thanks!

  5. #5
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Macro - Taking the value of a cell and finding it on another sheet

    See attached and respond with results. Obviously this is just a small sample from what I could take from your original post. It was not clear to me how the data was aligned on the DPS List worksheet, as you specified that you wanted the data from RR to populate A8:A10, but then continue on until no data. I made the assumption that the RR data to be grabbed is aligned horizontally, and that you also wanted it horizontal after moving to "List". We can revise it if I'm wrong.

    DPSRRToList.xlsm

    Please Login or Register  to view this content.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  6. #6
    Registered User
    Join Date
    04-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro - Taking the value of a cell and finding it on another sheet

    AlvraSiza, this is EXCATLY what I need. Just need to add a little more complex to it.

    I've attached the document (minus personal details)

    Basically, I need to take the infomation from DPS RR to DPS List and update - There will be duplicates on DPS RR but they will be placed, going downwards in date order so at the end, is the most recent changes. I need to take the value on column A on DPS RR and find on DPS list and update with the information from DPS RR in columns F & G & H & I and then repeat untill no further data exsists.
    Attached Files Attached Files
    Last edited by mrrobward; 07-12-2012 at 08:46 AM.

  7. #7
    Registered User
    Join Date
    04-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro - Taking the value of a cell and finding it on another sheet

    Sorry, anyone got any idea?

+ 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