L
Legacy 93538
Guest
Hi
I have this macro and it should opena document, create a new sheet, copy data from one sheet to the new sheet, then open the "PPIIIFORM" sheet and loop through the cell range "F4:U644" and check and if the cell has a text value copy the value and paste into another sheet in column a and continue to next cell and repeat process but for each new cell i need it to paste it into the next cell in column a.
This is what i have so far but it does not paste the value into the next cell down it pastes the value into the same cell:
Can anyone help and show me how to get it to paste the value into a new cell every time?
Thanks
Jessicaseymour
I have this macro and it should opena document, create a new sheet, copy data from one sheet to the new sheet, then open the "PPIIIFORM" sheet and loop through the cell range "F4:U644" and check and if the cell has a text value copy the value and paste into another sheet in column a and continue to next cell and repeat process but for each new cell i need it to paste it into the next cell in column a.
This is what i have so far but it does not paste the value into the next cell down it pastes the value into the same cell:
Code:
Sub PP3InputRef()
Dim StrFldr As String
Dim PPWB As Workbook
Dim cells As Variant
Dim Nrow As Long
Dim Nrow1 As Long
Application.DisplayAlerts = False
StrFldr = ThisWorkbook.Path
Set PPWB = Workbooks.Open(StrFldr & "\" & "HDE_PPIII_Input_Reference_Table_V1.xlsx")
PPWB.Sheets.Add.Name = ("Input_Reference_Table")
PPWB.Sheets("InputRefapd").Range("A1:Y1").Copy
Destination:=PPWB.Sheets("Input_Reference_Table").Range("A1:Y1")
PPWB.Sheets("Input_Reference_Table").Select: Columns("A:A").Select
Nrow = 2
For Each cells In Sheets("PPIIIFORM").Range("F4:U644")
If cells.Value <> "" Then Sheets("Input_Reference_Table").cells(Nrow, 1).Value = cells.Value
Nrow1 = Nrow1 + 1
Next cells
End Sub
Can anyone help and show me how to get it to paste the value into a new cell every time?
Thanks
Jessicaseymour