+ Reply to Thread
Results 1 to 6 of 6

How to reference to a specific sheet?

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    How to reference to a specific sheet?

    Hello,
    I know the title is not all that descriptive, I hope the explanation will help. I am trying to edit a macro that I have recorded earlier. This is first bit which I assume will work fine.

    Please Login or Register  to view this content.
    Now below this there are number of steps that clean the data in Sheet 2, once the data is cleaned I would like to paste it back into the sheet from where it was picked up and I do not know what that command would be. Can anybody please help me?

    Thanks,
    Aadesh

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: How to reference to a specific sheet?

    Aadesh,

    The question is a bit vague. You can set up variables for each sheet, and use those as the reference. For example:
    Please Login or Register  to view this content.
    DOes this help?

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: How to reference to a specific sheet?

    Not really BigBas, I will try to explain it further.
    Right now what I have this One sheet named SWES and then multiple sheets names SWIS 1, SWIS 2 and so on... In the present sheet, I have a macro that works fine when I run it on SWIS 1, SWIS 2 etc. So if there are 50 sheets the user had to run the macro 50 times. I am trying to minimize that to one by creating a macro that will loop through the workbook.

    The code below is what I have now and it works fine

    Please Login or Register  to view this content.

    This is how I would like the macro to work
    Macro should run from SWES sheet, it will then go to SWIS 1 copy the relevant data, paste and edit in Sheet 2 and copy back the edited data in SWIS 1. then move to next sheet.

    This is code below that I have started to work on but do not know what should go in those ?????
    Please Login or Register  to view this content.
    I hope this helps.

    Aadesh.

  4. #4
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: How to reference to a specific sheet?

    Try with:

    Please Login or Register  to view this content.
    .?*??)
    `?.???.?*??)?.?*?)
    (?.?? (?.?
    Pichingualas <---
    ??????????????????????????

    Wrap your code with CODE TAGS.
    Thank those who helped you, Don't forget to add to their REPUTATION!!! (click on the star below their post).
    Please mark your threads as [SOLVED] when they are (Thread Tools->Mark thread as Solved).

  5. #5
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: How to reference to a specific sheet?

    Hi Pichingualas,
    That did not work and I also observed that instead of copying the data from other sheets it macro copied the data from SWES sheet which should not have happened. Any other ideas.


    Thanks,
    Aadesh.

  6. #6
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: How to reference to a specific sheet?

    Try this:

    Please Login or Register  to view this content.

+ 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