Is this Conditional Sum task

  • Thread starter Thread starter fyrnetics
  • Start date Start date
F

fyrnetics

I'm using Excel 97 :(

Is there an easy route so that all entries in a {numbers} column, are
converted to a figure that always divisible by "3" in this case
ie the outer quantities of this particular product.
Thanks a lot :rolleyes:
 
Hi TVT (tapping away in Surrey, myself),

Do you want a formula?

=INT([cellref]/3)*3 ... for lower
=INT(([cellref]+2)/3)*3 ... for higher

or do you want to convert data entry?

Gaz
 
Thanks; yes it would be converting a data entry. :eek:
Hi TVT (tapping away in Surrey, myself),

Do you want a formula?

=INT([cellref]/3)*3 ... for lower
=INT(([cellref]+2)/3)*3 ... for higher

or do you want to convert data entry?

Ga
 
OK, then,

Press ALT+F11 to get to the VBE

Double click the sheet you want to add the functionality to

Cut and paste in

'--------------------------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Select Case Target.Column
Case 1 To 3
If IsNumeric(Target) Then Target = 3 * (Target \ 3)
End Select
End Sub
'--------------------------------------------------------------------------------


Change the column numbers to whatever you want

If you need more help, give me a shout

Gaz
 
Back
Top