Thread
:
macro
View Single Post
#
1
Posted to microsoft.public.excel.newusers
Don Guillett
external usenet poster
Posts: 10,124
macro
This could be put into a worksheet_change event to be completely automatic
Sub ifnum()
num = range("f2")
If num < 1 Then
nn = 1
Else
nn = Application.Min(Int(num / 2) + 1, 5)
End If
range("c14")=nn
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"neilb514" wrote in message
...
Hi
I have the below macro which works fine, but I need to add to it.
Sub Button6_Click()
Range("c12") = Range("c12") + Range("d8")
Range("A8,b8,b7,c8") = 0
End Sub
In cell c14 I want to display a number when I push the above button. In
cell
f2 I have a number that changes when data is added to my worksheet. if the
number in f2 is +1 or less i need a "1" displayed in c14, if it is +2 or +
3
I need a "2", if it is +4 or +5 I need a "3", +6 or +7 I need a "4", +8 or
more i need a "5". any help will be appretiated.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett