Hello everyone
Glad to join the forum!
I have an issue with macros in an excel file I'm working on. I attached worsheet screen shots for reference.
Sheet 'calculation has all the formulas'. Sheet ' drop down list info' has info for drop down lists (2 used in the main sheet).
There's a drop down list in the cell D6 that has 3 options: SEA, AIR and SEA+AIR.
I created 3 macros that should be triggered based on option selection from above mentioned drop down list.
SEA and AIR macro basically just hides selected rows. SEA+AIR macro unhides all. Each macro also goes back to cell D6 at the end.
However it doesn't seem to work at all. I have checked several forums but couldn't find a solution to my problem.
If I run macros manually everything works well.
Please advise what kind of mistake I did. I must say that I have completely no idea about VB and all the cose used in macros comes from recording macros step by step and then adjusting it a bit based on what I found online.
Thanks in advance for your kind help!
Macros code below:
Glad to join the forum!
I have an issue with macros in an excel file I'm working on. I attached worsheet screen shots for reference.
Sheet 'calculation has all the formulas'. Sheet ' drop down list info' has info for drop down lists (2 used in the main sheet).
There's a drop down list in the cell D6 that has 3 options: SEA, AIR and SEA+AIR.
I created 3 macros that should be triggered based on option selection from above mentioned drop down list.
SEA and AIR macro basically just hides selected rows. SEA+AIR macro unhides all. Each macro also goes back to cell D6 at the end.
However it doesn't seem to work at all. I have checked several forums but couldn't find a solution to my problem.
If I run macros manually everything works well.
Please advise what kind of mistake I did. I must say that I have completely no idea about VB and all the cose used in macros comes from recording macros step by step and then adjusting it a bit based on what I found online.
Thanks in advance for your kind help!
Macros code below:
VBA Code:
Sub SEA()
'
' SEA Macro
'
'
Rows("14:20").Select
Selection.EntireRow.Hidden = True
Rows("7:13").Select
Selection.EntireRow.Hidden = False
Range("D6").Select
End Sub
Sub AIR()
'
' AIR Macro
'
'
Rows("7:13").Select
Selection.EntireRow.Hidden = True
Rows("14:20").Select
Selection.EntireRow.Hidden = False
Range("D6").Select
End Sub
Sub BOTH()
'
' BOTH Macro
'
'
Sheet.Select
Selection.Sheet.Hidden = False
Range("D6").Select
End Sub