Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi I've found on this newsgroup a function to get the previous sheet
name Function PrevSheet() On Error GoTo EndFunction Application.Volatile True PrevSheet = Application.Caller.Worksheet.Previous.Name Exit Function EndFunction: With Application.Caller.Parent.Parent.Worksheets PrevSheet = .Item(.Count).Name End With End Function when i put =PrevSheet() i get the previous sheets name What i want to be able to do is use this in place of directly referencing the sheet name in my code as follows... =IF(G4-J4<0,G4-J4,G4-J4)+'Week 1'!H4 So i want to be able to replace Week 1 with PrevSheet but i've tried and falied on this. eg... =IF(G4-J4<0,G4-J4,G4-J4)+PrevSheet()!H4 Could someone show me the correct syntax for this. Cheers many thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Refer new sheet to previous sheet | Excel Worksheet Functions | |||
reference sheet tab name in a cell | Excel Discussion (Misc queries) | |||
Absolute Worksheet reference number | Excel Discussion (Misc queries) | |||
linking multiple sheets to a summary sheet | Excel Discussion (Misc queries) | |||
referring to previous sheet | Excel Discussion (Misc queries) |