All Questions
3,353
questions
1
vote
2
answers
68
views
How do I get my For Next loop to actually loop
I have a loop, however it only finds the first iteration and doesn't loop onto the next iteration.
I've set up a loop. So far, it opens a worksheet called Names, counts rows containing IMP and EXP and ...
1
vote
2
answers
107
views
How to declare variable by using for-next loop
The following code is very good.
Sub Macro1()
'Convert plain excel data to Excel Table. (Excel workbook consist of 3 sheets)
For i = 1 To 3
Worksheets(i).Select
Worksheets(i).ListObjects.Add ...
0
votes
1
answer
69
views
How to loop through an array?
How do I loop through an array?
The idea is to go to the Names worksheet, Where I have a list of users Initials and names in a list. Create 2 arrays that record the initial and name of each person. ...
0
votes
2
answers
60
views
VBA Loop I want to Terminate Function if there is no data
this might not be the right way to go about this, but I have a workbook that is running between a couple of programs pulling data and formatting it. One of the things I can't get past is that one of ...
1
vote
5
answers
117
views
Loop through an array/range
I want to find in an array/range if one or more cells have red background color. The output ( cell's address + text ) to be returned in a cell outside of range. I don't have any VBA experience and ...
0
votes
0
answers
15
views
run a vba through differents .txt files [duplicate]
I have code that removes quote marks (“) from a txt file but a have a long list of files to run this code.
Option Explicit
Sub Sample()
Dim MyData As String
Dim FlName As String
'...
0
votes
1
answer
52
views
Loop VBA through worksheets to check for issues
I am struggling to get a code to loop through a set numbers of worksheets (sheets 10 to 16) for the second sub in the code.
The code was provided by another user (thanks "Taller"!) which i ...
0
votes
1
answer
61
views
VBA find 2nd, 3rd and 4th occurrences if multiple IF conditions met within FOR NEXT loop
Hello everyone and don't judge me a lot, as I'm not experienced VBA coder just time to time trying to make my life easier and automate some things...
I have 2 tables on 2 sheets and trying to fill T1 ...
1
vote
1
answer
75
views
Stop executing loop when first blank cell is encountered
We have a workbook where data from completed invoices is copied into column C of Sheet1 every period.
Column A is for the Year and Column B is for the financial period (we run 13 periods per year).
...
0
votes
1
answer
79
views
VBA Loop function for duplicate values
I hope you could help me and point me in the right direction,
Is there a way to use loop function to return the value of each duplicate value in a list?
I’m new using VBA, I’m currently trying to find ...
0
votes
1
answer
45
views
Camp Team Automated Generator: Moving Data to Keep Columns at 10
I've been hitting a wall with my code. I am making an automation macro for excel for a ministry that does summer camps. At these camps girls and boys are split into teams based loosely on grade. For ...
1
vote
0
answers
37
views
How can I use "on error" without making additional loop
I'm preparing macro that copy and paste between sheets and data ranges. Also it's deleting unwanted data.
Workflow is:
Filtering and deleting data from one sheet (if error, then this step should be ...
0
votes
1
answer
18
views
Create a Loop & save PDF based on Specific values from another sheet
Seeking some assistance. I am not a programmer but I managed to save my PDF's by a different file name through a loop function.
I have 2 tabs that work coherently with each other. My master tab ...
-2
votes
1
answer
51
views
My VBA for loop is giving me a count that is 1 higher than the actual count or on some occasions 1 lower
The question is exactly as described in the header, but I will give an overview of what the code is intended to do for better context as it is a chunky bit of code.
Iterate through 6 tables in ...
0
votes
1
answer
60
views
Word VBA: Need help on Selection.Find .Text parameters - currently causing an infinite loop
Currently, I am creating a macro where I can move data from Excel into Word tables. We want to keep the formatting of the existing Word tables and only move the data into each cell. The data involved ...