J
Juan Sanchez
Marcy
The code as you posted it will only change the cells on
column A. If you input the value in I14 then it will not
change it, unless you change this part in the code:
Set rng = [A:A] 'Change this to reflect the cells that you
want to alter
To
Set rng = [I14:N36]
Make sure that you changed that bit of code and then try
again,
When you paste the code on the view code section of the
sheet (right click the sheet tab and so on) make sure
there are no red fonts. you should only see black, blue
and green.
Hope this helps, I pasted the code in a sheet and worked
fine.
Cheers
Juan
in my named range (I14:N36) rounded up to the next number
divisible by 3.
the number 400 in cell I14 and NOTHIN'!! No change. It
was working before....
selecting view code; then I pasted the code...isn't that
correct?)
would execute?
The code as you posted it will only change the cells on
column A. If you input the value in I14 then it will not
change it, unless you change this part in the code:
Set rng = [A:A] 'Change this to reflect the cells that you
want to alter
To
Set rng = [I14:N36]
Make sure that you changed that bit of code and then try
again,
When you paste the code on the view code section of the
sheet (right click the sheet tab and so on) make sure
there are no red fonts. you should only see black, blue
and green.
Hope this helps, I pasted the code in a sheet and worked
fine.
Cheers
Juan
code to accomplish the task of making all numbers entered-----Original Message-----
Hi, all--
Ron Rosenfeld was kind enough to provide this wonderful
in my named range (I14:N36) rounded up to the next number
divisible by 3.
workbooks and it's not working, for some reason. I enterThe new question is, I have cut and pasted this into new
the number 400 in cell I14 and NOTHIN'!! No change. It
was working before....
working just fine by right clicking on tab name and(fyi..I cut and paste from a file this was in that was
selecting view code; then I pasted the code...isn't that
correct?)
this into a MACRO that I can assign a button and thisAnd, perhaps more importantly, is there a way to make
would execute?
Application.WorksheetFunction.Ceiling(c.Value, 3)Anxiously awaiting whatever advice you can offer.
=====================
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim c As Range
Set rng = [A:A] 'Change this to reflect the cells that you want to alter
If Intersect(Target, rng) Is Nothing Then Exit Sub
Application.enableevents = False
For Each c In Target
If c.Value > 0 Then c.Value =
Application.WorksheetFunction.Floor(c.Value, -3)If c.Value < 0 Then c.Value =