looping worksheets

  1. F

    VLOOKUP VBA looping multiple worksheets

    Thanks in advance for solving this. I've created a macro but it's returning an error. I have a two column list in my first sheet and I want VLOOKUP to go down the list. So for cell C1 sheet 2, I want it to lookup Cell A2 in sheet named "First". For cell C1 in sheet 3, I want it to lookup Cell...
  2. V

    Array of Worksheet CodeNames

    All, I've created an Array of worksheet 'Names', to loop through them. Instead I'd like to use the 'CodeName' so if the user changes the name on the tab, the code does not break.. Any suggestions on how to do this? Dim vWSArray as Variant, i as long Dim ws as Worksheet '- Create...
  3. L

    VBA - Using Declared Range Variable in looping script across multiple sheets

    I am trying to adjust the code so that it cycles through the sheets using a range variable rather than hard coding Range ("O4"). However, when I run the code, it works on the first sheet and then gives me a run-time error '1004' when it gets to "MyRange.Select" - Any ideas what I am doing wrong...
  4. L

    Simplify Code by loopnig, possible?

    So my code is working great, but looking at my code I can't help but think that there must be an easier way to loop through the script so it isn't so repetitive. Any thoughts? Sub Macro1() Dim ActSheet As Worksheet Dim JUNCTION As String Dim BOC As String Dim Amount As String...
  5. D

    VBA to loop through multiple worksheets

    Hi I'm looking for some help to write a code to complete the same task across a number of worksheets and have no idea where to start. Basically I have 20 Worksheets currently. The first one is called "index", then I have 17 called App1, App2, App3 etc up to App17 and a final two called...
  6. B

    Loop through sheets problem

    I am trying to loop through all the sheets in my workbook and rearrange some data. So far I have been unsucessful for some reason. I think I have the loop and everything set up correctly, but the macro gets hung up on one sheet and executes the code over and over again on the same sheet without...
  7. TheBlademaster

    Use "For" "Next" with Codenames & i through Worksheets

    IT'S VERY SIMPLE!!! ANY IDEAS?????? Option Explicit Dim LoopingSheet As Worksheet Sub GoThroughSeveralCODENAMES_WS() Dim i As Integer 'i have 10 ws, codename MySheet1, MySheet2, MySheet3... till 10 ' want to do something like this: for i = 1 to 10 set LoopingSheet = ("MySheet" & i)...
  8. B

    Looping through an Array of Wooksheets.

    Windows 7 Excel 2007 GOAL: My intent is to create a single workbook. Sheet1(pga_list) will be used for data purposes and will be referenced by all other sheets through a data validation variable and vlookup values. This I have done. I wish to add an indefinite number of sheets beginning at...
  9. M

    Loop through a worksheet and populate data into another worksheet if criteria is met

    Hi There! I have Sheet1 in workbook "DATA.xlsx" that has data. I.E. column1 column2 567 John 567 May 123 Kate 567 Larry 456 Bill I would like Sheet1 in ANOTHER workbook "SUMMARY.xlsx" to list all of the people who meet the number criteria I type in...
  10. P

    Loop Macro. Prompt input.

    Hi, I have several hundred workbooks with multiple worksheets(15-35) that I am trying to tidy up, so the data can be entered into a database. Its my first attempt at VBA and between the forum and macro recorder I made an attempt which is below. I just can't seem to get over the last part. I have...
  11. zakasnak

    Add MEMO sheet to beginning of network print job.

    I am looking for help to modify this code that prints each sheet to a different printer on the network. I would like for the code to print a sheet that will be named "MEMO" at the beginning of each print job. :beerchug: BrianB was extremely helpful setting up the Network Print code. Thanks...
  12. R

    Looping through sheets to select range, copy and paste

    Hi, I am trying to write a macro that will loop through all sheets in my workbook except one (entitled "List"), and copy the same range in each sheet (B1:B6) and then paste into the sheet "List" one under the other using the NextRow method. I have browsed some previous posts on the same...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top