View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Running a macro if a cell contains number 1

If Range("D159").Value < 1 Then
Exit Sub
End If
--
Gary's Student
gsnu200711


"Aidan" wrote:

I have a macro that I activates if I click on a check box. It copies rows,
Can someone please give me the additional code I need at the start so the
macro only runs if the content of a specified cell in the Testing Combined
sheet is 1.

The code I have so far is
Sheets("Skills Required").Select
Rows("63:65").Select
Selection.EntireRow.Hidden = False
Sheets("Testing Combined").Select
Range("D159").Select