Show value for cells in 'previous' sheets
Closed
Ciaran
-
Sep 26, 2009 at 07:48 AM
venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 26, 2009 at 09:23 PM
venkat1926 Posts 1864 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
- Based on the values in cells b77 b81 ✓ - Excel Forum
- Excel macro to create new sheet based on value in cells - Guide
- Copy cells from one sheet to another ✓ - Excel Forum
- How to automatically copy cells in excel from another sheet - Guide
- If cell contains text then return value multiple conditions ✓ - Excel Forum
1 reply
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
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.