for loop

  1. M

    Get Data From Sheets to MasterSheet and keep All sheets updated if Something is updated

    Hey Guys, I'm new To VBA und English is not my Motherlanguage :) I'm Currently Working on a Code that should get Data from some Specific Sheets and put them in a Mastersheet by lisiting the SheetName Next To the Data but Somehow it doesn't work I Have Sheets named after the Market the Cars are...
  2. M

    For next loop is not working

    Hi guys, I'm trying to use for next loop, on button click it should check the value from the cell R2, and according to the value of the cell to show the next value from the list in column O in label. Bellow you can find the loop which I used, but it's showing the value from the list in column...
  3. T

    VBA: Copy/Paste Table Rows; For Loops and If/Then Statements but the code doesn't care!

    Hi All, I have what I thought would be a simple copy/paste macro which appears to ignore my attempts to put a constraint on it. I'm sure there is something I am missing but I can't seem to spot it. Any help would be appreciated! Ideally the code looks at Table 2 and checks the column in the...
  4. D

    Listobject .listcolumns in for loop

    Hello Im am stucked, really tried hard to find out, since I am a newbee (not sooo new, but quite weak) I try to find a solution during learning by doing on my project I know this is nasty and long, but the aim is simple: Using Listobject on sheet I have: 1 userform 1 Listbox 11 checkboxes 1...
  5. D

    VBA to copy paste data from 'multiple sheets' in a 'Report_Data' workbook into a new 'Master_Data' workbook in single worksheet called Client_Master

    Dear All, I daily get a system generated report in excel file named 'Report_Data.xls' which contains customer/client wise details of each of the client in a separate worksheet with name of customer/client E.g. File Name : Report_Data.xls -->> this workbook has 250+ sheets, i.e. 1 each for the...
  6. T

    VBA For loop suddenly broken--what happened?

    This sub used to work perfectly. Then I added the variable misCell in the sub declaration and in the first line of code, and for some reason, the ElseIf statement in the first For loop is now broken. Nothing in that code changed (as far as I know). But suddenly it is filling all the "TOEZ...
  7. B

    Check if cell input matches another cell input from list

    I'm new to coding with excel vba, but i have an excel map with a list of superiors and a list of potential successor. Now i got the task to create an excel map where you can put in the position of a superior into an Input Box and it should automatically show you the successors that fit based on...
  8. N

    If value from range in Sheet1, is not in Sheet2, add to range in Sheet2.

    I think I am close with my code below, but it doesn't function quite as flawlessly. What I am trying to achieve is: Check to see if cell in Sheet1 range (found in column A), exists in Sheet2 column A. If cell exists in Sheet2, +1 to the value in column B If cell DOES NOT exist in Sheet2...
  9. M

    Adapting VBA Code to Exit Loop on encountered blank cell (Data Validation List)

    Hello Guys, I am using the code below to iterate through a data validation list, however in the data validation list there are a lot of blanks. I wish to stop the loop when a blank row is encountered. The code works perfect, but it keeps looping until infinity. Does anyone have an idea what...
  10. C

    copy range form one sheet to another

    Hello all, Need your help. I am unsure why the below is not working. All I am trying to accomplish is to lookup a value in column A, find that same value in Column A on a different sheet, and copy the data from the first sheet in Column G:O to the same G:O range in the second sheet... When I...
  11. N

    VBA for statement to filter

    I am needing some help figuring out my issue with the part of my VBA sub. I am new to this forum so if I did anything incorrect, please let me know. Sheet1 is a continuous list of everything being recorded and kept. Sheet2 is an updated list that is retrieved, with updated lines and new lines...
  12. C

    For loop to save time when copy data in columns range from another file worksheet

    Hi VBA experts, Could you help me to write a for loop of this code. The purpose of this vba code is search for sheets that matchs SheetName column in SourceFile, copy data until the last rows of entry in Columns Range of Source File to Destination File. I can do it without a loop as the code...
  13. A

    Copy column to range

    Hello. I would like to copy a column to another worksheet when the header matches a string input. I have the code below: Sub find_col(name As String) Sheets("name").Range("A:A").Clear With Sheets("lot") .Activate For i = 1 To .UsedRange.Columns.count If Cells(1, i).value = name Then...
  14. A

    Select range in for loop

    Hello, I have a sheet with 35 columns. I would like to create a For loop to go through all the headers of these columns, find a specific one and return the column underneath it as a Range. I have tried Dim rng As Rang With Sheets("MySheet"). UsedRange For i = 1 To .Columns.count If...
  15. A

    Speed up code: convert datetime to just date

    Hello, I am trying to convert about 75 000 lines of datetime formate data (YYYY/MM/DD HH:MM:SS) into just dates (YYYY/MM/DD). The only way I have found to do this it to concatenate the YEAR(), MONTH(), DAY() parts of the data in one column into another column. However, with so many rows, this...
  16. A

    Case inside For loop?

    Hello. I have 3 different types of data in Range("A:A") : warnings, errors, good data. The criteria that makes a value either warning, error or good is stored in cells C1, C2, C3, C4. If the value of a cell in A:A is between C1 and C2 or between C2 and C3 it is a warning. If it is greater than...
  17. N

    HOW TO USE FOR LOOP OR FOREACH LOOP TO COPY ENTIRE A COLUMN END PASTE IT TO INFINITE COLUMN

    A B C D E F G H I Z ALEX ALEX ALEX ALEX ALEX ALEX ALEX ALEX ALEX ALEX JACOB JACOB JACOB JACOB JACOB JACOB JACOB JACOB JACOB JACOB RYAN RYAN RYAN RYAN RYAN RYAN RYAN RYAN RYAN RYAN
  18. P

    Can someone tell me what's wrong with my code? For loop

    Hi, can someone have a look at the code below. It's long, but repetitive. Each IF statement works but only for the first IF comparable, and the ELSE. All of the ElseIF's don't seem to be working and I can't figure out why. Trying to spruce up the holiday tracker for my workforce. Column "AS"...
  19. H

    Exit Sub when For Condition is met

    Hi I want my code to exit as soon as the condition of the if statement within the for loop are met and the message box appears (shown in yellow below). When exit sub is added, it exits after the messagebox but the rest of my code does not run when the conditions are not met, and if I remove...
  20. Johnny Thunder

    VBA Help - If Filtered Range Return Nothing Then

    Hello all, I am having some issues with a statement in my current code and all sources online aren't really answering my question directly. I have a fairly long script that loops thru a range to get a filter criteria value and then apply the filter to a range on a seperate sheet. This code...

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
Top