Re: $$Excel-Macros$$ SAME MACRO FOR MANY CELLS

2016-04-02 Thread Sam Mathai Chacko
You want to check whether each cell from A1 to G2 has the text "ABC" in it or not? And if yes, hide the same rows? On Sat, Apr 2, 2016 at 7:00 PM, NIJ wrote: > I want to aply below macro to cells A1 to G1 AND A2 TO G2. IS IT > POSSIBLE THAT IT CAN BE DONE SIMPLY

$$Excel-Macros$$ SAME MACRO FOR MANY CELLS

2016-04-02 Thread NIJ
I want to aply below macro to cells A1 to G1 AND A2 TO G2. IS IT POSSIBLE THAT IT CAN BE DONE SIMPLY INSTEAD WRITING BELOW MACRO FOR EACH CELL VALUE. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("A1").Value = "ABC" Then Rows("12:18").Hidden = True