Simple question
VBA Telemetry pings you when your VBA projects fail
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Simple question

  1. #1
    Guest

    Default

     
    cell c1 is the sum of a1 & b1. I need to round c1, but the value varies depending on a1 & b1's values. How do I do this?


  2. #2
    Board Regular RichardS's Avatar
    Join Date
    Feb 2002
    Location
    Victoria, Australia
    Posts
    761
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Don't quite understand. Do you mean the way the rounding is done is determined ny the values in A & B? If so, can you give an example of what you mean.
    Richard

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    202
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    i think the answer will depend on how many variations there are. can you prvide more detail?

  4. #4
    Guest

    Default

    Say for instance...

    in one case the values of A1 & B1 might be:
    A1=8.67
    B1=1.33
    C1=A1/B1 (6.518...), but I need this to be a whole number, or 7

    in another case, the values of A1 & B1 might be:

    A1=12.33
    B2=1.08
    C1=A1/B1 (11.416...), but it too will need to be a whole number, or 11.

    In all cases, C1 needs to be a whole number, being rounded down if it's __.49 or less, or rounded up if it's __.50 or more.

    Any ideas??





  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,579
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi
    Just use =Round(A1/B1,0)
    This should round up or down to the nearest integer
    Derek

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com