Seba Robles
Board Regular
- Joined
- May 16, 2018
- Messages
- 73
- Office Version
- 2019
- 2016
- Platform
- Windows
Hello everyone, so here's the information on my workbook and code;
- I have 2 worksheets; Sheet1 where I have a range of values in column A and Sheet2 where my code runs
Here's part of my code
My code simply inserts a new row within Sheet2 in row c, copies formulas from row 3, pastes them in newly inserted row c.. and what I need next is for the c variable to select the next cell value from the list I have in Sheet 1, run code again until last cell value from Sheet1 List is completed.
Maybe a For Next or Loop code would help but I don't know how to implement it.
I would appreciate any help you can give, thanks in advance!
- I have 2 worksheets; Sheet1 where I have a range of values in column A and Sheet2 where my code runs
Here's part of my code
Code:
Dim c As Integer
c = Worksheets("Sheet1").[B]Cells[/B][COLOR=#ff0000][B](16, "A")[/B][/COLOR][B].[/B]Value
Sheets("Sheet2").Select
Rows(c & ":" & c).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("3:3").Select
Selection.Copy
Rows(c & ":" & c).Select
ActiveSheet.Paste
' Then select Next cell value from List/Range in Sheet1 to place in C variable
My code simply inserts a new row within Sheet2 in row c, copies formulas from row 3, pastes them in newly inserted row c.. and what I need next is for the c variable to select the next cell value from the list I have in Sheet 1, run code again until last cell value from Sheet1 List is completed.
Maybe a For Next or Loop code would help but I don't know how to implement it.
I would appreciate any help you can give, thanks in advance!