Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying data from different sheets

I need a lot of help with the following: I need some help moving
column of data from different sheets to my front sheet. I know how t
move data but I need to throw a twist into copying data. I want to cop
data from different sheets and put it under the data from the las
page. I would also like to put the sheet name after the data.

Sheet 2
Cell = PVT Smith
Cell = SPC Joe

Sheet 3
Cell = PVT Jones

Sheet 4
Cell - SGT Able

Example of what I want on Sheet 1:

1 PVT Smith (Sheet 2)
2 SPC Joe (Sheet 2)
3 PVT Jones (Sheet 3)
4 SGT Able (Sheet4)
5


Here is a better way of understanding what I want to do:
If I understand you correctly, you wish to scan 5 columns on 5 sheet
and colsolidate all the cells that contain data in those ranges int
one column on your main sheet........I assume one below the other unti
all is done, rather than any sort of concatenation to get them all int
one column. And,
in doing so, you wish to identify each entry with it's source
sheet........

I have no idea how to write a macro so break it down "dummy" style i
possible. This will help me account for soldiers in my unit.

Thanks,
Dari

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying data from different sheets

Any help

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying data from different sheets

From your description I think this is what you are after


Sub ffffff()
Dim i As Integer ' sheet count
Dim c As Range
Dim rC As Long ' row copy from
Dim rP As Long ' row paste to

' loop through each sheet except 1st
For i = 2 To Workbook.Sheets.Count Step 1
' get last row used in column a
r = Sheets(i).Range("A" & Rows.Count).End(xlUp).Row
' loop through each used cell in column a
For Each c In Sheets(i).Range("a1:a" & r)
' get next free cell in column a on 1st sheet
rP = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row + 1
'populate a cell on 1st sheet with data from a cell on
' another sheet & pad data with sheet name
Sheets(1).Cells(rP, "A").Value = c.Value & " (" & i.Name & ")"
Next c
Next iWs

End Su

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying data from different sheets

I will try it. I appreciate your time and knowledge

--
Message posted from http://www.ExcelForum.com

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
Copying Data from Multiple Sheets to One sheet MAB Excel Worksheet Functions 1 January 15th 08 08:28 PM
2 questions: copying between sheets and display 0 data... Grim Excel Worksheet Functions 5 April 23rd 07 02:24 PM
copying data in multiple sheets KT Excel Worksheet Functions 1 November 8th 06 09:28 PM
Trnasferring/ Copying Data Between Sheets Neil M Excel Worksheet Functions 1 May 12th 06 08:21 AM
Copying Data onto sheets Mycotopian[_2_] Excel Programming 0 January 8th 04 08:16 PM


All times are GMT +1. The time now is 07:13 AM.

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"