+ Reply to Thread
Results 1 to 3 of 3

command button count won't add in the correct cell, based on combobox selection.

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    5

    command button count won't add in the correct cell, based on combobox selection.

    Hi

    I am using a command button to count the number of clicks made. However I need to be able to select the cell in which to add, based on the selection of a combo box.

    eg

    If combobox linked cell =1, then I need to add +1 to Cell A1 when the command button is pressed.

    But if the value of combobox linked cell is 2, then I need to add +1 to cell A2


    So it's like I need to be able to offset the cell in which to add, by the value of the combobox.

    It gets much more convoluted than that, but if anyone can give me the basic principle, I would appreciate it!

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: command button count won't add in the correct cell, based on combobox selection.

    dantastic,

    Here's some basic code you should be able to adapt. It assumes B1 is the combobox's linked cell:
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 01-05-2012 at 12:44 PM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    12-20-2011
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: command button count won't add in the correct cell, based on combobox selection.

    Thanks Tigeravatar

    It works a treat...Took a little while to get my head around it, but I'm there now!

+ 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