View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Using If Then Else within a Macro

One way:

IF RANGE("A10").VALUE="Yes" _
THEN
RANGE("A12").VALUE = "Good"
ELSE
IF RANGE("A10").VALUE="No" _
THEN
RANGE("A12").VALUE = "Bad"
ELSE
RANGE("A12").VALUE=""
END IF
END IF


HTH,
Paul



--

"dave caizley" <dave wrote in message
...
I'm fairly new to Macros so this may seem very simple to you.

I basically want to run a nested statement
if A10="Yes" then type "Good" in cell A12, if A10="No" then type "Bad" in
A12 else a blank cell.

I know I can do it as a formula but I would prefer this to be incorporated
into an existing macro.

Thanks in anticipation