+ Reply to Thread
Results 1 to 6 of 6

Is this Conditional Sum task

  1. #1
    Registered User
    Join Date
    08-02-2004
    Location
    Thames Valley Uk
    Posts
    8

    Is this Conditional Sum task

    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
    Thames Valley tapper

  2. #2
    Registered User
    Join Date
    06-21-2005
    Posts
    19
    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
    2B OR NOT 2B, that is FF

  3. #3
    Registered User
    Join Date
    08-02-2004
    Location
    Thames Valley Uk
    Posts
    8

    Convert data entry

    Thanks; yes it would be converting a data entry.

    Quote Originally Posted by gazornenplat
    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

  4. #4
    Bob Phillips
    Guest

    Re: Is this Conditional Sum task

    or

    =FLOOR(A1,3)
    =CEILING(A1,3)

    or even

    =ROUND(A1/3,0)*3

    for the nearest 3

    --
    HTH

    Bob Phillips

    "gazornenplat" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > 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
    >
    >
    > --
    > gazornenplat
    >
    >
    > ------------------------------------------------------------------------
    > gazornenplat's Profile:

    http://www.excelforum.com/member.php...o&userid=24494
    > View this thread: http://www.excelforum.com/showthread...hreadid=381182
    >




  5. #5
    Registered User
    Join Date
    06-21-2005
    Posts
    19
    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

  6. #6
    Registered User
    Join Date
    08-02-2004
    Location
    Thames Valley Uk
    Posts
    8

    Thumbs up Conditional Sum

    Thanks all

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1