I have some data sitting in cells c39 to c48. Each of these cells contain a formula looking at another sheet. The returned data contains either some text or a number
If c39 returns a number I want to hide rows 39 to 48
If c40 returns a number I want to hide rows 40 to 48
If c41 retuens a number I want to hide rows 41 to 48
If c42 retuens a number I want to hide rows 42 to 48
If c43 retuens a number I want to hide rows 43 to 48
If c44 retuens a number I want to hide rows 44 to 48
If c45 retuens a number I want to hide rows 45 to 48
If c46 retuens a number I want to hide rows 46 to 48
If c47 retuens a number I want to hide rows 47 to 48
If c48 retuens a number I want to hide rows 48
or I would be happy to say:
If c39 returns a number I want to hide rows 39
If c40 returns a number I want to hide rows 40
If c41 retuens a number I want to hide rows 41
If c42 retuens a number I want to hide rows 42
If c43 retuens a number I want to hide rows 43
If c44 retuens a number I want to hide rows 44
If c45 retuens a number I want to hide rows 45
If c46 retuens a number I want to hide rows 46
If c47 retuens a number I want to hide rows 47
If c48 retuens a number I want to hide rows 48
The sheet already contains this VBA code
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("c38:c47").Rows.AutoFit
End Sub
and I would still need to have this on the sheet
Im new to VBA so any help would be rally appreciated
Bookmarks