Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have an excel book with a lot of sheets . All sheets contain data in cells from E column . I need a macro which copies that data to the last sheet in E column ( which is empty at start ) with 1 cell empty between data from 2 different sheets . Example : Sheet1 : data from E1 to E50 . Sheet 2 : data from E1 to E 25 . The result should be put in sheet3 , E column like this : E1 to E50 (copied from sheet1 ) , E51 empty , E52 to E76 ( copied from sheet2) I have more than 2 sheets , with different names , so i should be able to select how many sheets to be analised , and where to put the results -- andrei ------------------------------------------------------------------------ andrei's Profile: http://www.thecodecage.com/forumz/me...hp?userid=1056 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=154389 Microsoft Office Help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try this Sub CombineColumnE() LastSheet = Sheets.Count For SheetCount = 1 To (LastSheet - 1) LastRowSource = Sheets(SheetCount).Range("E" & Rows.Count).End(xlUp).Row LastRowDest = Sheets(LastSheet).Range("E" & Rows.Count).End(xlUp).Row Sheets(SheetCount).Range("E1:E" & LastRowSource).Copy _ Sheets(LastSheet).Range("E" & (LastRowDest + 1)) Next SheetCount End Sub -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=154389 Microsoft Office Help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() It works . Thanks -- andrei ------------------------------------------------------------------------ andrei's Profile: http://www.thecodecage.com/forumz/me...hp?userid=1056 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=154389 Microsoft Office Help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro that analyses data from 3 columns and puts result in 4th | Excel Programming | |||
Macro searches for keyword. If found , puts 0 in cell from next co | Excel Programming | |||
What Excel macro puts data in the NEXT row of a sheet? | New Users to Excel | |||
Macro puts #REF in VLOOKUP formula | Excel Worksheet Functions | |||
In nameing a sheet in Excel it puts a .xls] in front why? | Excel Discussion (Misc queries) |