looping

  1. D

    Vba to cycle through sub folders and perform functions on excel files

    hi everyone, I have a folder with subfolders that have excel files in them. I am trying to have a vba loop go through each of the sub folders, extract the value from Cell F1 from a specific sheet and then paste that value into another workbook. a couple of roadblocks: 1.) each folder has a...
  2. J

    Macro Loop through cells in column

    Have a column C with a lot of data. Many of the cells contain spaces in the end. I want to trim each cell by using a macro looping through each cell. I want to practice looping. Is it possible to write a code which loops through each cell and removes the space(s) in each cell. Thanks.
  3. S

    Creating a dictionary of all the values from a column

    there is going to be a data in A column of current sheet containing unique values. I want to add all these already existing unique values to a dictionary and use each of the unique value as a criteria for filtering in next sheet. How to add all the values of A column to the dictionary? and how...
  4. A

    Auto Create Charts from Different Rows in Excel

    Hello! I'm very new to VBA and have managed to create most of what I need; but am stuck on the hardest part IMO - Looping through the rows to create each chart. What I'm looking to achieve: Creating a chart for each row of data in my excel sheet. Each row of data has three years of monthly...
  5. E

    Looping through months and years

    Hi I Want to build an excel file that looks like this: On column A the user put years (i.e: a1 is 2015 , a2 is 2016 , a3 is 2017) I want the macro will put on column C the year/month (i.e: c1 is 1/2015 , c2 is 2/2015 , c12 is 12/2015 , c13 is 1/2016 , c36 is 12/2017) I want to get 36 cells with...
  6. N

    Convert Case Without Loop

    Is there a code that I can add in my VBA that will convert selected columns to proper case without looping? columns = m, q, ae, and af.
  7. T

    Looping for speed

    I read that purely for speed purposes, you should use a For Each loop when looping through a collection. For arrays, use a For Next loop. What about for a dictionary? Which is faster? Thanks
  8. C

    Loop for all worksheet

    Hi team, can anyone help me looping below macro for all the worksheet in workbook stuckup while looping Sub Loopforall() On Error Resume Next For Each cell In Range("C3:C250000,E3:E250000,Q3:Q250000,S3:s250000").SpecialCells(xlCellTypeConstants, xlNumbers) If Icell.Value >...
  9. A

    Need help with nested looping

    I have this question: Create a Sub with any combination of nested loops. This nested loop should take the baby girl names input (below) and print out every possible combination. These input names will need to appear in your workbook somewhere. Print out the combinations in the workbook itself...
  10. L

    Looping through a specific number of chart series

    A quick question for anyone that can help: How would I go about looping through a specific number of chart series? I am interested in scaling the primary y-axis using the first 7 chart series (the 8th series is on the secondary axis). Thanks
  11. C

    VBA, Loop troubleshooting and Compile Else If error

    Hi guys, This is my code as followed, Sub Macro3() ' Macro3 Macro Sheets("MV filter").Select Range("A1").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Sheets("MV-70%").Select...
  12. R

    Excel Looping Macro

    Hello all, I am in need of looping the macro code below Sub Test() If Range("D2") = "Secondary" Then Range("J2,I2,R2,S2,T2").ClearContents End Sub The code above works great for the one line it is clearing but.. I need it to test conditions from 2 to 6000 on each column If Range("D2") =...
  13. vds1

    Recursion VBA finding percentage

    Hello Everyone, Happy New Year Using the below table i would like to determine % of corp and % of Ind mentioned in column E and F. if the flag is Corp then Corp% is 100% if the flag is Ind then Ind% is 100% Above two cases are simple and straight forward. But when the flag is fund then the...
  14. S

    Looping Macro using an input fro the user

    Hello Excel people! I'm making a promotional document for my company. It uses a combination of RandBetween and conditional formatting to make lights change color on a Christmas Tree, flames flicker on a Menorah ect. Right now I have a macro that will rerun all the calculations once a second...
  15. SharmaAntriksh

    Vba Code to Select Range with blanks

    I have a dataset where i am trying to select a range but there are a lot of blank cells in between and each time i run range("a2345:c3345").end(xlup).select It stops at the first blank I came up with a temporary workaround for this by looping this code Sub SelectRange() For x = 1 to 300...
  16. A

    Looping within same range

    Hi guys, i did some basic looping with below codes but it didn't give me the numbers running as my attachment. What should i do to make the number running in below range every time i insert it? sub test() for x=0 to 9 cells(x+1,1)=x+1 next x end sub
  17. S

    Progress bar with no loop ?

    Hi All, Does progress bars with Excel VBA works only if there is a Loop? Is it possible to have progress bar while more than one macros running, without looping at all? Thank you in advance.
  18. G

    Get sheet name from composite code name

    Is there a simple way of retrieving the worksheet name from the code name when the code name = "Sheet" & "1", "2", "3", etc. I can do it by looping through all worksheets, but there must be an easier way. Thanks in advance for any suggestions.
  19. S

    Error 424: Looping using For - Next

    Hi, New to VBA here, getting error 424 object not found with this code after running, it runs only once perfectly but stops after 1 iteration. Consider "yyy" as all different variables (code I am using is below). Any help would be appreciated :) :) <tbody> Sub DeleteSpecifcColumn() Set...
  20. A

    Comapre Row against ADODb Recordset

    I'm connecting to Access and opening a recordset for data which should match my Worksheet. Is there a way to check each Excel row against the recordset, without looping through every column? (They're in the same order on both).

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