Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Loop
Hi, I have an excel spreadsheet that contains data in a number of columns (some contain data and some do not). I would like to have a seperate spreadsheet check the range (E3:IV3), if data is present in this row, I would like the seperate spreadsheet to write the cell values of the range to a seperate spreadsheet. How can I approach this issue? Thanks in advance for anyhelp -- lbargers ------------------------------------------------------------------------ lbargers's Profile: http://www.excelforum.com/member.php...o&userid=32798 View this thread: http://www.excelforum.com/showthread...hreadid=526899 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Loop
Can we conclude that if there is data in Column E, then the row should be
copied Sub CopyData() Dim rng as Range, rng1 as Range Dim rng2 as Range With Activesheet set rng = .Range(.cells(3,"E"),.Cells(rows.count,"E").End(xl up)) On error resume next set rng1 = rng.Specialcells(xlconstants) On Error goto 0 if not rng1 is nothing then set rng2 = intersect(rng1.EntireRow, .Columns("E:IV")) rng2.copy Destination:=Worksheets("Data").Range("A1") end if End With End Sub -- Regards, Tom Ogilvy "lbargers" wrote in message ... Hi, I have an excel spreadsheet that contains data in a number of columns (some contain data and some do not). I would like to have a seperate spreadsheet check the range (E3:IV3), if data is present in this row, I would like the seperate spreadsheet to write the cell values of the range to a seperate spreadsheet. How can I approach this issue? Thanks in advance for anyhelp -- lbargers ------------------------------------------------------------------------ lbargers's Profile: http://www.excelforum.com/member.php...o&userid=32798 View this thread: http://www.excelforum.com/showthread...hreadid=526899 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Loop
Tom, thanks for your reply.. How can I specify the location of th seperate .xls spreadsheets in the example you provided -- lbarger ----------------------------------------------------------------------- lbargers's Profile: http://www.excelforum.com/member.php...fo&userid=3279 View this thread: http://www.excelforum.com/showthread.php?threadid=52689 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add a Range to an existing Range in a loop? | Excel Programming | |||
Loop through a range | Excel Programming | |||
For Each Loop w/ a range | Excel Programming | |||
loop in range | Excel Programming | |||
Loop through a range | Excel Programming |