for loop

  1. N

    Finding the differences then copy and paste code to a new sheet

    I've been trying to write this VBA code to automate the process of finding differences between 2 original source sheets and then copying the entire row of the differences into a new sheet. the process should be like this: The code should look into Column A for both source sheets, finding only...
  2. R

    VBA Separate a single range into multiple ranges

    I appreciate you all in advance. I want to change the meta range of below code (meta range:M31:AM53) to 42 separated ranges below...
  3. Ottsel

    VBA Import Data Only IF Material Matches

    Struggling to create a loop within a loop. Overall, VBA isn't my strongest skill, but trying to improve when and where I can. Currently, I have the code below that will grab my data and important it onto another sheet to be reviewed. Dim r As Long 'row Dim row As Long 'row count...
  4. T

    Help Needed! Macro to Create and Connect Buttons with Multiple Sheets

    I need to create a set of buttons (using a for loop) that all have the ability to clear the contents of a select amount of cells on different worksheets (all worksheets are identical). All the worksheet names are in a list in a separate sheet (Column 8/H in 'Code and Data Centre') , and I have...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

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