+ Reply to Thread
Results 1 to 8 of 8

procedure to copy values from different worksheets to a new one, given a value

  1. #1
    Registered User
    Join Date
    11-26-2008
    Location
    Philippines
    Posts
    26

    procedure to copy values from different worksheets to a new one, given a value

    Hello there

    I am trying to realize a procedure to obtain a quick search for some codes I have I a small warehouse.

    Basically, I have six worksheets where I have, on two different columns each,

    the code, the quantity, the shelf

    where it is stored.
    what I have been asked for is:
    given the shelf, to have got back all the codes and quantity that there are in this shelf.

    My Idea is:
    in a sheet called <<initial>>, create a cell where I write the value of the shelf (this value in a text).
    Then, with a VB procedure, start activating first worksheet, start reading the first column.
    if the shelf value corresponds to the required shelf, then activate a sheets called "Results" and write there all the value corresponding to code and quantity.

    Then, when ended the column, I would move to the second column.
    Once ended the second column I would activate the second worksheet.

    But I am having some problems since the beginning, since I have problems in reading the value of the shelf column.


    question 1
    I am attaching how I have started to wrote the procedure

    Please Login or Register  to view this content.

    Please can anybody tell me why I can read the value of the cell ?

    question 2.
    If anybody has a simpler or smartes way to solve this topic, it is welcome !

    Thanks !

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: procedure to copy values from different worksheets to a new one, given a value

    Hi,

    See the sample file...
    I have tried to recreate something similar to your setup and code.
    Hopefully that gives you an idea of how to structure the code to do what you need.

    PS: I do not understand why the need is to scan down a second column if you are wanting to locate a Shelf code in a certain column?
    Attached Files Attached Files
    Regards,
    Rudi

  3. #3
    Registered User
    Join Date
    11-26-2008
    Location
    Philippines
    Posts
    26

    Re: procedure to copy values from different worksheets to a new one, given a value

    many thanks

    I'll take a look and try to learn from you !
    Concerning your question:
    I have to scan all the worksheets.
    In every worksheet I have two columns that I need to scan both.

    That is: in every column of every worksheet I can have codes that are included in the required shelf

    Many thanks again

  4. #4
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: procedure to copy values from different worksheets to a new one, given a value

    OK.
    If you need further assistance, just shout.

    In order to assist with the column scan, could you set up a small sample file that simulates your data. Its just so I can see how the columns are arranged and how I should add to the macro to scan the appropriate columns.
    Last edited by RudiS; 04-21-2014 at 12:31 PM.

  5. #5
    Registered User
    Join Date
    11-26-2008
    Location
    Philippines
    Posts
    26

    Re: procedure to copy values from different worksheets to a new one, given a value

    Hello

    I am here attaching you the file modified as it is.
    I deem that, since we have the data in two columns, we need to repeat the procedure changing the column.
    Moreover, this line

    Please Login or Register  to view this content.
    Need to be modified, since I can't copy the whole line, because I am copying also the data from the second column and in this case there can't be the required shelf.

    Thanks !
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: procedure to copy values from different worksheets to a new one, given a value

    Hi Paul,

    Here is the code to do both columns...
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-26-2008
    Location
    Philippines
    Posts
    26

    Re: procedure to copy values from different worksheets to a new one, given a value

    Dear Mr. RudiS

    I would like to thank you for your kind answer !

    Many many thanks !

  8. #8
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: procedure to copy values from different worksheets to a new one, given a value

    It's a pleasure Paul.
    Cheers

+ 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. VBA Copy values of last 20 worksheets
    By nickmangan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2014, 07:44 PM
  2. Copy Paste Values all worksheets & creating new worksheets
    By ryan2600 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2012, 11:46 AM
  3. Copy values across worksheets
    By SueWithQuestion in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2010, 08:04 AM
  4. [SOLVED] copy between worksheets does not copy formulae just values
    By Chris@1000 Oaks in forum Excel General
    Replies: 0
    Last Post: 03-19-2006, 07:50 AM
  5. Repeating macro procedure on several worksheets
    By Shandy720 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2005, 10:06 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