AndyVoClosser
New Member
- Joined
- Oct 30, 2023
- Messages
- 9
- Office Version
- 365
- Platform
- Windows
Hi Community. I need you help to fix this Marco. I am trying to show data based on the condition of a cell is selected. Below is my code. Thank you so much.
Sub ShowData()
If ActvieSheet.Range("A2").Select = True Then
Sheets("Chart Data").Select
Range("B2:B6").Select
ElseIf ActvieSheet.Range("B2").Select = True Then
Sheets("Chart Data").Select
Range("D2:D6").Select
ElseIf ActvieSheet.Range("C2").Select = True Then
Sheets("Chart Data").Select
Range("E2:E6").Select
End If
End Sub
Sub ShowData()
If ActvieSheet.Range("A2").Select = True Then
Sheets("Chart Data").Select
Range("B2:B6").Select
ElseIf ActvieSheet.Range("B2").Select = True Then
Sheets("Chart Data").Select
Range("D2:D6").Select
ElseIf ActvieSheet.Range("C2").Select = True Then
Sheets("Chart Data").Select
Range("E2:E6").Select
End If
End Sub