+ Reply to Thread
Results 1 to 4 of 4

Having issues with creating a macro attached to a button to add +1 to accummulative total

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Kansas City, Mo, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Having issues with creating a macro attached to a button to add +1 to accummulative total

    Ok.. so I've read the blogs, posts, and the help files but I'm still not seeing how to do what I want to do. I finally got some of the basic functions down.. finally figured out VLookup... but having a devil of a time figuring out the VB to set a script to do what I want. So let me explain:

    I need to create a sheet that has VLookup on a list of items where the lookup will bring up an accumulative total each time a macro button is clicked adding just 1 count to the total each click. The lookup will display the total next to the item but I need to make sure the total does not get erased, reset, or simply disappear. I have attempted to do this by means of 8 different sheets to accommodate the total collection... :-( I know... sad... Please help?

    I deleted the last worksheet that I had as I gave up. but presently trying to put one together again.
    Last edited by PapaPoe; 09-22-2012 at 09:01 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Newbie needs help

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.


    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
    To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.


    On this page, below the message box, you will find a button labelled 'Manage Attachments'.
    Clicking this button will open a new window for uploading attachments.


    You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
    Alternatively you can click the Attachment Icon to open this page.


    To upload a file from your computer, click the 'Browse' button and locate the file.


    To upload a file from another URL, enter the full URL for the file in the second box on this page.
    Once you have completed one of the boxes, click 'Upload'.


    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    09-21-2012
    Location
    Kansas City, Mo, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Newbie needs help

    So in response I changed the thread name... I apologize. The issue I am having has now fractured into two issues. I've been able to get the vbs to work on adding 1 to the count each time I click a button but now when I try to reference this to another cell I am having to change the script to accommodate the new cell each time. Is there a way to use the same macro without having to save multiple copies of the same file under different names to perform the same function for a new cell? Along with this I am trying to keep the running total in the data sheet so that it can be referenced again. I used VLookup but the formula disappears when I run the click button to add 1. If I try to use VLookup along with Hlookup I am getting "circular" errors.... Is there a way to reference a cell... use the data from it in my accummulating total then return the final sum back to the referenced cell without the reference to circular or without losing the formula to reference the cell?

    The script I am talking about for adding +1 to the cell is:

    Please Login or Register  to view this content.


    Thank you
    Last edited by Cutter; 09-22-2012 at 07:15 PM. Reason: Added code tags

  4. #4
    Registered User
    Join Date
    09-21-2012
    Location
    Kansas City, Mo, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Having issues with creating a macro attached to a button to add +1 to accummulative to

    Sorry forgot to attach.
    Attached Files Attached Files

+ 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