Show value for cells in 'previous' sheets
Closed
Ciaran
-
Sep 26, 2009 at 07:48 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 26, 2009 at 09:23 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 26, 2009 at 09:23 PM
Related:
- Show value for cells in 'previous' sheets
- Sheets right to left - Guide
- Excel macro to create new sheet based on value in cells - Guide
- How to see previous downloads on safari - Guide
- Mark sheet in excel - Guide
- How to open excel sheet in notepad++ - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 26, 2009 at 09:23 PM
Sep 26, 2009 at 09:23 PM
try this macro(Modify to suit you)
remember activesheet.previous will give error if the active sheet is the first sheet because there is no previous sheet.
Sub test() Dim j As Integer, k As Integer j = Worksheets.Count 'MsgBox j For k = 2 To j Worksheets(k).Activate 'MsgBox ActiveSheet.Name Range("B1") = ActiveSheet.Previous.Range("A1") Next k End Sub
remember activesheet.previous will give error if the active sheet is the first sheet because there is no previous sheet.