Thread: coding vba
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
barnabel barnabel is offline
external usenet poster
 
Posts: 119
Default coding vba

Jim, you got the homework wrong.

That is setting A=9 if C is between 5 and 10 and doesn't set A otherwise.

"Jim Jackson" wrote:

If B = 14 then
A = 4
elseif C = 5 then
If C <=10 then
A = 9
End If
End If

--
Best wishes,

Jim


"paul" wrote:

hwo do i write this into a VBA code
where i want variable A to be set to 4 if the variable B is greater or
equal to 14

otherwise it is to be set to 16 if the variable C lies between 5 and
10 otherwise it will be set to 9???