+ Reply to Thread
Results 1 to 3 of 3

Macro for calculation and user entry in same cell?

  1. #1
    Registered User
    Join Date
    11-13-2006
    Posts
    6

    Macro for calculation and user entry in same cell?

    A friend told me that I could probably do this with a macro ... but I have no idea how. Can anybody help me accomplish this?

    Here's the problem:

    Say I start off with an amount in cell: D104
    (For grins, say the amount is: (5)

    Now ... say I later enter amounts in cells: H95 through H102
    (say, the amount entered in each of these cells is: (1)

    Is there a way via a macro or VB to add the amounts in (H95:H102) to the already existing amount in (D104)?

    In the example I explained above ... the total would be: (5+1+1+1+1+1+1+1+1)=13

    Thank you!

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    it could be done by a macro but you risk corupting you data for example you have h in h95 you add ather number in other cells and you end up with 13 in h95 you then change h97 from 1 to 4 h95 would become 17 as the macro has no way of knowing what your original starting number was in h95.

    It would be better to use a sum formula than a macro

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Please Login or Register  to view this content.

+ 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