Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro analyzes all sheets and puts result in last sheet


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro analyzes all sheets and puts result in last sheet


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro analyzes all sheets and puts result in last sheet


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro that analyses data from 3 columns and puts result in 4th andrei Excel Programming 2 September 30th 09 09:18 AM
Macro searches for keyword. If found , puts 0 in cell from next co andrei Excel Programming 3 September 29th 09 12:47 PM
What Excel macro puts data in the NEXT row of a sheet? KenC New Users to Excel 1 January 16th 07 06:48 AM
Macro puts #REF in VLOOKUP formula DJH224 Excel Worksheet Functions 1 January 27th 06 05:37 PM
In nameing a sheet in Excel it puts a .xls] in front why? EZE Excel Discussion (Misc queries) 2 April 27th 05 04:27 AM


All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"