Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I am using excel 2000 and have a workbook which currently has 2 sheets, Targets and Individual Store Targets
The Target Sheet has the the Store Name and Towm in column A, and various targets in columns B, C, D & E, the data starts in Row 4 and currently goes down to row 109 but is constantly increasing On the Individual Store Targets sheet I have links to the data on the Targets sheet and I use the macro below to change the links to each stores name and targets and print it, my code is below: Sub PrintIndividualStoreTargets() ' PrintIndividualStoreTargets Macro Dim i As Long, ii As Long Dim FRow As Long Dim LRow As Long Dim Rng As Range Sheets("Individual Store Targets").Visible = True Sheets("Target").Activate LRow = Cells(Rows.Count, "A").End(xlUp).Row FRow = 4 Set Rng = Sheets("Individual Store Targets").Range("A3:D3,A6:D6") Worksheets("Individual Store Targets").PrintOut For i = FRow To LRow ii = i + 1 If i = LRow Then Rng.Replace What:=i, Replacement:=FRow, LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Exit Sub End If With Rng .Replace What:=i, Replacement:=ii, LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Worksheets("Individual Store Targets").PrintOut End With Next i Sheets("Individual Store Targets").Visible = False End Sub I now need to change this to a workbook with 3 sheets, Targets, Individual Store Targets and Individual Store Targets Ireland The Target Sheet has the the Store Name in column A, and various targets in columns B, C, D & E, the data starts in Row 4 and currently goes down to row 109 but is constantly increasing On the Individual Store Targets Sheet I have links to the data on the Targets sheet and on the Individual Store Targets Ireland sheet links to the first Ireland store which is in Row 34 There are currently 11 stores in Ireland, which will over time increase, randomly spread across the rows of data How can I change the macro so that the UK stores data is linked to the Individual Store Targets sheet and the Ireland stores linked to the Individual Store Targets Ireland sheet At the moment the only thing identifying the stores in Ireland is the Town eg Cork, Dublin etc in column A if necessary I could add another column which would identify UK and Ireland Thx in advance for any help Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
Changing Macro Folder | Excel Discussion (Misc queries) | |||
link to combobox | Excel Discussion (Misc queries) | |||
Changing trend lines with macro | Charts and Charting in Excel | |||
How to stop Excel remembering/loading macro from previously opened Workbook | Excel Discussion (Misc queries) |