loop and copy

  1. M

    Macro to transpose two columns and add an extra column to a number of fields

    Hi there, I have 67 fields in column A and B beginning in A2 and B2 - I would like to take the first value in A2 and place it in D1 and then the value in B2 and place it in E1. I would like to then add a column with "Diff" in F1. This column should be formatted to display a percentage value and...
  2. M

    Copy and paste data in multiple columns in to one column

    Hi there, I have data in multiple columns on Sheet "Fields" - from A-AS. Each column varies in data and has 1-100 rows populated. I wish to take all this data from these columns and paste them into one column on the "Sheet3" tab. On the fields tab there is a header row which I do not require...
  3. R

    Loop through folder and Copy values and Formats of first sheet into summary sheet

    I have been working through VBA code that copies the first sheet in a workbook from a folder to another workbook("Master"). The code copies the data correctly but upon saving I get certain cells with errors (#Ref) this is due some of the copied cells having formula. I would like the copied to...
  4. A

    Filter a table using a different name each time and paste the results as values in a new file to be emailed

    Sheet1 contains a source table (its size changes every Qtr) and sheet2 contains an index table, containing 'ProfitCenter Name' and 'Analyst email' headers. (1) I am trying to filter the source table in sheet 1 each time according to a specific 'ProfitCenter Name', then (2) copy the results and...
  5. R

    Loop variable unique values onto corresponding tab

    Hello everyone, I need to take a list of 5,500 rows which have an identifier in Column A and put all the rows associated with that identifier onto a new tab labeled with the identifier. My identifier is a "Plan Code" and each row contains asset data associated with that Plan. Some plans may...
  6. R

    Excel VBA Loop Routine Outlook email not printing first message

    Hi I have a problem with a routine that:- 1) loops through a customer table (CustCode(col1),FirstName(col3),EMail(col5) 2) make a copy (based on CustCode) of a master workbook and sends it to a designated directory 3) uses outlook to send the new workbook to the sender (using firstName, Emial)...
  7. B

    Loop and Copy/Paste all Rows equaling a variable into a new Excel File

    Hi everyone, I'm new to vba so will really appreciate any help ;). After a long unfruitful search I can't find why my code won't work. To explain the problem, I have an Excel File with a bunch of data sorted by an index called Prod.Type in column A <tbody> Prod.Type Name Price Nb.Stock 2...
  8. B

    Match data from 2 sheets, copy from one to the other.....

    I have a couple spread sheets that have data as follows Sheet 1 – Column A through U (row 5 first entry with data w/ no defined amount of rows, could be thousands) Sheet 2 – Column A through T (row 5 first entry with data w/ no defined amount of rows, could be thousands) I need help...
  9. M

    copy data from one excel file to another

    Hi All, I've an array in one excel file from which i'm trying to copy rows to other excel files, basically from my source file i'm copying each row to within a table to different destinations Excel files, the destination rows is fix but I need to loop through my roughs on the source file which...
  10. R

    Looping userform ComboBox 1-10 with associated TextBox 1-10

    I can loop through all 10 ComboBoxes with the following code. [Code] Dim cmb As combobox, i As Integer For i = 1 To 10 Set cmb = Me.Controls.Item("ComboBox" & i) MyPNum = cmb.Value Cells.Find(What:=MyPNum, After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart...
  11. Nayasoch

    Loop a single cell value untill a certain value

    Hello Everyone: I have certain value in A1 and will obtain result in another cell. I have to insert no from 1-100 serially in A1 to get results and paste in separate column , any VBA code I'd highly appreciate.
  12. G

    Speeding up a loop

    Hello! I've been lurking these forums for quite some time, and found so many helpful. Now I'd like to ask for some help too. I have a nasty array formula in cell c6, with matching time and different criteria, at first I autofilled it on my sheet which is around 5000 rows at max, but it took...
  13. O

    Check if a value is positive or negative VBA

    Hello everyone, I have been trying to write some VBA code to check if a cell contains a positive, or negative percentage. Based on whether it is positive, or negative I would then like to copy and paste the value into a new table on a separate sheet which has two tables. One containing all the...
  14. J

    Copy Data from one file, then loop through a folder and paste the data in each file

    Hey friends, I am having trouble with my excel vba code to perform this macro. I get an error on the line that I put in red text. Please help! [code] Sub Button1_Click() Dim file As String Dim myPath As String Dim wb As Workbook Dim rng As Range Dim wbMaster As Workbook Set...
  15. D

    Coding 2 loops in VBA

    Hi, I don't have a lot of experience with macros but I managed to build the start of something that works using the macro recorder (See below). The issue that I'm running into now is that I want to code a loop into the macro. I have a list of websites in column G and I want to open them in...
  16. J

    copy & paste using looping

    Sub dataloop() Lastrow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row For i = 4 To Lastrow If Cells(i, 3) = "Pass" Then ActiveCell.Offset(-4).Copy ActiveCell.Offset(2, -2).PasteSpecial End If Next i End Sub I am trying to use looping to copy and paste the value where C= Pass, then go...
  17. B

    Multiple Condition If statement with loop

    Hello, Im new to VBA and have hit a wall trying to figure out how to write a if statement with multiple conditions to loop through a set of data. I'm teaching myself and the best way has been to look at code others have wrote and then modify it. However, I cant find anything that is similiar to...
  18. L

    Locking manual data against variable data

    Hi all. I hope the following makes sense and thanks in advance for your help. I have a spreadsheet in which the data is automatically updated every day on sheet 1. On sheet 2 column D from sheet 1 is copied across to sheet 2 into column B. Sheet 2 B2 =SHEET1!D1 Sheet 2, column C is a...
  19. E

    macro to copy data on a loop until a blank row is hit errors

    I am trying to write a macro with VBA that will copy the data from my table in a sheet tiled "Front End" to a table on another sheet called "Raw Data". here is my code so far for the copying and pasting into the other sheet in the next empty row. I keep getting error that says "application...
  20. C

    Need Help with Creating an If-Then Statement

    I just started learning the ropes to VBA and don't fully understand it yet. I am trying to create something that will change the value of two different cells, based on the contents of one cell. Specifically, if the text in column B says "shoecare", then the contents in column E need to change...

Some videos you may like

This Week's Hot Topics

Top