looping

  1. M

    Help adjusting a variable- row/ column counter

    I'm trying to tweak a macro to add a new loop and I have it 90% figured out, but I need help on one simple aspect. Basically it loops through rows and columns so the original way it was set up uses these two variables to decide how many rows and columns to loop through intRows =...
  2. L

    Macro wont stop running

    Hey guys, any help would be fantastic. I simply want to run a macro based on a variable whenever the sheet is activated. All the individual macros below work fine when ran alone. However, when I put them into the code below, it seems they keep running or run over and over until I get an error...
  3. Z

    VBA Script Edits: Secondary Filter+Sort+Export

    Geniuses, I am trying to adapt a script I have to add a more complicated step in filtering, sorting, and looping through my data. Range 1 = Column I2:I Range 2 = Column J2:J Basically, I need a way to rework the code to select the first unique value in Range 1, then select the first unique...
  4. svendiamond

    VBA to Edit Protected View Workbooks Issue

    I have the following code which is supposed to loop through all open workbooks which are currently in "Protected View" (the yellow bar where you need to click "Edit" to be able to use the workbook) and it only loops through one or two, then stops and I don't know why. 'protected view fix Dim...
  5. C

    VBA looping with defined name as criteria - rows

    Hello, I'm writing some protocol that prints out reports based on a list that I put into a defined name. So there are 14 locations that I want to run the report for that I used the defined name "Locations". I have a data dump worksheet that contains a list of users and there information. I want...
  6. C

    VBA Row looping Issues

    Hello I have pretty detailed code but I'm having an issue that when there is only supposed to be one line of data after a header it repeats the header instead of the first line of data. If there is more than one line of data after the header it works perfectly. Here it is: 'Main Loop...
  7. S

    Simple loop through column

    Sorry, it's been too long since I've fooled with VBA. I've forgotten how to loop. I can the simple code below to display a picture in Cell B1 from the URL in C1. But the URLs in Column-C actually start at C9 and go to an indefinite number of rows. In one worksheet there may be 10 rows with...
  8. N

    Can you help me to loop my code to the next row?

    Good afternoon, I have built some code that I have applied to a command button, which copies and pastes data from one sheet to the next, but only If cell c7 is populated. I am struggling to work out how to loop this code to the next row, and the next row and the next etc. I only want to loop...
  9. J

    Comparing multi-dimensional arrays in VBA to single column - double loop

    I want to compare values in a Multid array to a values in a single Column. Stoploss: 45 54 76 OHLC: 37 43 30 40 32 43 41 43 32 54 76 87 I want to compare each value in Stoploss to OHLC and find the first value that is larger than Stoploss in OHLC, in this case the first number larger than...
  10. R

    Macro Not Looping Through All Worksheets

    Hello everyone, I try and not ask too many questions here because I can usually find answers specifically for or close enough to modify for my needs. However, I am stumped on this one. I have a workbook that I work off of weekly. I have a Main Page and then tabs for each state. Around 30 tabs...
  11. M

    Please Help: Modify VBA Code to loop through Excel Sheets to PowerPoint!

    Hi there, I have made a Work Plan Excel Workbook. Each sheet in my Excel Workbook should go into a slide. I would like to loop through my Excel Sheets to create the full Powerpoint Deck. This will save a great deal of time in my department of work.Please help me modify this code to loop through...
  12. Q

    VBA question - Copy/Paste/Loop

    I am brand new to VBA, so please go easy on me... :biggrin: I have spent several hours learning about VBA, and playing around with different ways to make my looping problem work, but I am now at a complete loss. I am trying to create a copy/paste macro to loop through my worksheet. I need...
  13. T

    Using Arrays to Increase Looping Speed

    Hello All, I've got the below code which is working fine but currently is not very efficient. Wondering if anyone knows how I can change this so that it's using arrays? From reading the forum it seems if I use arrays this will be much faster. I have 6 other similar codes to below doing exactly...
  14. F

    Copying Multiple Named Ranges from one sheet to Another

    Hello Everyone! This is my first question posted, so sorry if it is not aesthetically pleasing. I am in the process of making a sub or two to create named ranges based on data in one worksheet, and then transfer it to another worksheet. I have working code below, but I do not wish to type out...
  15. J

    Looping Through Worksheets

    Can some one help me in getting my code to loop through all worksheets in WorkBook Range("B1:P1").Select Application.CutCopyMode = False With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlTop .WrapText = True .Orientation = 0...
  16. M

    Identifying empty cells and inputting correct value in with inputbox

    I would like to loop through all rows of data to ensure the region is filled in. If not, I would like an input box to identify the store number and ask the user to input the correct region, and then have what the user typed fill in the empty region cell. I.e. the store number is 10 but the...
  17. C

    Vlookup values in an array and store them in another array

    I´ve been struggling witht this for a while, please help... I want to store range("G7:G200") as arr1, then store range ("A7:C500") as arr2, also have a third array called arr3, then I need to vlookup all the values for arr1 in arr2 and store the results in arr3, then write arr3 in...
  18. K

    VBA- Nested For Each Loop to Scrape HTML Data Table- If Error move to next cell

    Hey Mr. Excel peeps! I have been working for quite a while on a way to scrape data from an HTML table. I have been coming along further and further, but am stuck again. Thanks to John_w, (Thanks John_w!), I have edited my code with the following code below. I was running across an error after...
  19. M

    If a CheckBox is ticked, then select that cell and call a Module - Loop Through Until

    Hi All, At the moment I have a code that adds checkboxes to a dynamic table (i.e. it could be 100 rows, or it could be 5 rows). I am trying to write a code that says: "if the value next to a checkbox is "TRUE", then please select this cell and call another module. Dim rng As Range Dim cell As...
  20. G

    Slow Macro with SpecialCells and looping

    Hi all, I am trying to run a macro to delete all the "..." in my excel document. I have tried to do this two ways, both by looping, and with special cells. Depending on the data, this is taking upwards of an hour. Does anyone have any reccommendations on how I can improve this. The data, does...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top