+ Reply to Thread
Results 1 to 7 of 7

Userform, finding referenced cell by category and date and adding value to worksheet.

  1. #1
    Registered User
    Join Date
    10-29-2011
    Location
    ---dundalk, ireland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Userform, finding referenced cell by category and date and adding value to worksheet.

    Really hope you can help me out here. My knowledge of vba is quite poor. I hope I can explain this to you correctly.

    I am having a problem using data from my combobox to find the cell on the worksheet and write to a specific adjacent cell.

    Worksheet name is Jan
    ComboBox1 Name is cmbDate
    ComboBox2 Name is cmbCat
    TextBox name is txtAmount
    CommandButton1

    Using the date value from cmbDate, find this text in Row A of worksheet Jan and write the Value of txtAmount in a cell adjacent to the date and under the cell equal the cmbCat value when the CommandButton1 is pressed.

    I have uploaded the workbook 'Household Planner' to make it a little clearer
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Userform, finding referenced cell by category and date and adding value to worksh

    Your file won't open for me, can you try saving the file above in Excel 97-2003 format .xls?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-29-2011
    Location
    ---dundalk, ireland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Userform, finding referenced cell by category and date and adding value to worksh

    I have saved it and uploaded as requested (household planner.1). Thanks for taking the time.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-29-2011
    Location
    ---dundalk, ireland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Userform, finding referenced cell by category and date and adding value to worksh

    Uploaded now is my previous post

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Userform, finding referenced cell by category and date and adding value to worksh

    This is how I would do that. you seem to have some variations on the individual sheets and the titles of columns and such. There's no need to worry about that, your form can grab the appropriate titles across row 5 in each sheet, it won't matter if they're the same from sheet to sheet. These macros will get the column categories and the dates from the "activesheet", the enter the values into the table accurately as you make entries.

    If you select the same date/category a second time, it will add the values together.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-29-2011
    Location
    ---dundalk, ireland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Userform, finding referenced cell by category and date and adding value to worksh

    Worked a treat, just a bit of tidying up to do as you say. Thank you so much, I really appreciate it and admire your skill.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Userform, finding referenced cell by category and date and adding value to worksh

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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