Using out put values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to use an output number so that if a cell is blank that it
will put a specified number in another cell? Thanks.
 
Sets y = 10, then checks to see if there is a value in B1, if both are true,
then it puts the value of in B1.

Sub Macro1()
y = 10
If y = 10 And Range("B1") = "" Then
Range("B1").Select
Range("B1").Value = y
Else
End If
End Sub
 
Thank you....

David said:
Sets y = 10, then checks to see if there is a value in B1, if both are true,
then it puts the value of in B1.

Sub Macro1()
y = 10
If y = 10 And Range("B1") = "" Then
Range("B1").Select
Range("B1").Value = y
Else
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top