Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating a main and 'regional' sheets


I have a sheet ("Division") that is fed by a macro on an application
form. The user hits the macro button and the "Division" sheet is
populated. However, I need this to then feed 5 other sheets depending
on the geographical Region . Is there anyway of either getting the
macro to populate the main "Division" sheet and simultaneously one of
the geopgraphical regions, or Getting the Division sheet to feed the
regions sheet.

I'll post the code I've already got for populating the "division" if
that helps.

Thanks


--
M3Cobb
------------------------------------------------------------------------
M3Cobb's Profile: http://www.excelforum.com/member.php...o&userid=24986
View this thread: http://www.excelforum.com/showthread...hreadid=385172

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Populating a main and 'regional' sheets

This should be possible, but your post is a little vague to answer completely.

-How can you tell which of the 5 region sheets needs populating once the
division sheet is populated- is there a particular cell on the Division sheet
with this information?
- How are the individual region sheets identified- are the sheet tab names
e.g. North, South etc.?

The easiest solution may be to make a new copy of the entire Division sheet
once it has been populated, then rename it for the appropriate region-
something like this:
Thisworkbook.Sheets("Division").Copy
after:=ActiveWorkbook.Sheets(ActiveWorkbook.Sheets .Count)
ActiveSheet.Name = "South Region"

It may also be useful to post the relevant bits of your existing code as well.

Cheers,
Dave

"M3Cobb" wrote:


I have a sheet ("Division") that is fed by a macro on an application
form. The user hits the macro button and the "Division" sheet is
populated. However, I need this to then feed 5 other sheets depending
on the geographical Region . Is there anyway of either getting the
macro to populate the main "Division" sheet and simultaneously one of
the geopgraphical regions, or Getting the Division sheet to feed the
regions sheet.

I'll post the code I've already got for populating the "division" if
that helps.

Thanks


--
M3Cobb
------------------------------------------------------------------------
M3Cobb's Profile: http://www.excelforum.com/member.php...o&userid=24986
View this thread: http://www.excelforum.com/showthread...hreadid=385172


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating a main and 'regional' sheets


This is a shortened version as it's rather repetitive. The key cells ar
B20:C20 as they contain the region name.


Code
-------------------
Sub macro1()
'
' macro1 Macro
' Macro recorded 21/04/2005 by Mike Cobb
'

'
If Sheet1.Range("C4").Value = vbNullString Then
MsgBox "******** Please fill in the PHC Number ********", vbCritical
Exit Sub
End If

If Sheet1.Range("H49").Value = vbNullString Then
MsgBox "******* The DOV Has Not Been Signed and Returned *******", vbCritical
Exit Sub
End If

Workbooks.Open FileName:= _
"\\wdb.local\burton\work\JML\REM\12345.xls"
Sheets("Division").Select
Range("A8").Select
Selection.EntireRow.Insert
Windows("Fastrac formmac.xls").Activate
Range("C4").Select
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Fastrac formmac.xls").Activate
Range("F4:G4").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Range("B8").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C8").Select
Windows("Fastrac formmac.xls").Activate
Range("F6:G6").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D8").Select
Windows("Fastrac formmac.xls").Activate
Range("E11:F11").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E8").Select
Windows("Fastrac formmac.xls").Activate
Range("E14:F14").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F8").Select
Windows("Fastrac formmac.xls").Activate
Range("B14").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("G8").Select
Windows("Fastrac formmac.xls").Activate
Range("B20:C20").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H8").Select
Windows("Fastrac formmac.xls").Activate
Range("E20:F20").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("I8").Select

End Su
-------------------

--
M3Cob
-----------------------------------------------------------------------
M3Cobb's Profile: http://www.excelforum.com/member.php...fo&userid=2498
View this thread: http://www.excelforum.com/showthread.php?threadid=38517

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
how do i sum the same cell in numerous sheets behind a main njparamedic Excel Worksheet Functions 2 May 14th 09 02:27 PM
Auto Populating Fields from many worksheets to one main worksheet Vincent Excel Worksheet Functions 1 November 14th 08 05:18 PM
12 Sheets - Submit to One Main Spreadsheet Chris Excel Discussion (Misc queries) 2 July 10th 08 09:50 PM
Updating sheets in Workbook from main sheet IMS Lori Excel Discussion (Misc queries) 0 January 28th 08 07:11 PM
populating sheets based on data from parent sheets seve Excel Discussion (Misc queries) 2 January 15th 05 09:22 PM


All times are GMT +1. The time now is 06:58 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"