+ Reply to Thread
Results 1 to 4 of 4

macro to run through all worksheets

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    macro to run through all worksheets

    hello

    seeking some help from the pros regarding a macro that can be copy/paste values from column "B-X", across ROW 2, into the 25+ worksheets that i have in my file?

    each worksheet contains the city code, i.e. Miami-Tampa, NY-Newark etc up to a total of 30. this is my master file, which gathers the info. from other files and puts them onto one sheet. so each week (since this is a weekly opex i do), i have to manually copy/paste the values from column B-X and row 2-52 (row 2 = week 2 in the year, to a total of 52 rows = 52 weeks).

    also, i was hoping once the macro is run across, if it can alter the change the name of the file it's gather the information from
    -i.e. if i copied values from b-x for Miami-tampa, if i run the macro and it copy/paste the values to another worksheet i.e. NY-Newark, can it find/replace the file name as well? below is the formula that is contained in each cell (this is an example from cell "H":

    ='C:\Users\PK\Desktop\PK Work\Archive\P10W1\[Miami-Tampa.xls]Ghost Summary'!$H$21

    so basically, i need the above formula, to be pasted onto the 25+ worksheets and do a find/replace accorindly to the worksheet (tab) name? pls note the "H" is for column H"....and i need the formula from column b-x to be pasted across to each worksheet. please help, thank you.

  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 to run through all worksheets

    Why have separate sheets for each group? It's much more efficient to have one sheet with an identifying column
    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 Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: macro to run through all worksheets

    hello

    i have attached a sample workbook.

    in the first worksheet, i have highlighted the line in "yellow" that needs to be copy/pasted (paste special formulas) into the other worksheets.
    -pls note once u copy paste the formulas onto the other worksheet, i need to run a find a replace for columns "b-x" and in this instance row 46 and 68 to match the city name in the formula.
    -in this sample, i have trimmed it down to a few regions, but i really have a total of 30 so it is quite manually so if it can processed automatically, that would be awesome. pls help and thx you.
    -it will prompt to search for the file folder, for this particular instance, i usually hit "escape"


    i hope someone can guide with a formula that does the copy paste in the corresponding row for each sheet and then does the find/replace function as well. pls and thxs
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: macro to run through all worksheets

    any input guys? thxs

+ 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