Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a spreadsheet that has 6 tabs and need to read the data in a specific
column (D) in each sheet...if the cell is not blank then store the data in a new sheet....then go to next sheet and so on...i can't get my loop to work....any suggestions? This creates the new sheet: Set NewSheet = Worksheets.Add NewSheet.Name = "Echo" Sheets("Echo").Select Sheets("Echo").Move After:=Sheets("Store Ops") Sheets("Apparel").Select I want this to read data in each cell in column D for each sheet and if it's not blank then write record to Echo sheet: Sub RoundToZero() For Each ws In Worksheets dlr = Cells(Rows.Count, 1).End(xlUp).Row + 1 If ws.Name < ActiveSheet.Name Then With ws Cells(dlr, "d") = .Range("d2").Value Next ws End If End Sub This is the data i want to write to Echo sheet: Sheets("Echo").Select ActiveCell.FormulaR1C1 = "=MID(Janitorial!R[3]C[3],1,5)" Sheets("Echo").Select |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looping Macro | Excel Discussion (Misc queries) | |||
Macro looping endlessly | Excel Worksheet Functions | |||
Looping macro | Excel Worksheet Functions | |||
Looping a macro | Excel Discussion (Misc queries) | |||
Macro looping problem. | Excel Discussion (Misc queries) |