+ Reply to Thread
Results 1 to 5 of 5

Formula too complex

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Formula too complex

    I have a userform from which I select a customer. Cells update from VLOOKUP formulas as I select different customers. I have two questions: 1. Is there a more efficient formula than the one I am using as there will be more than two months of data. 2. I would like the formulas to be in VBA (not in the worksheet) and update the worksheet when I click a different customer. I have attached a sample file.
    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Formula too complex

    I have included the date in the userform but would still like to know how to simply the formula or if I transfer the formula to VBA, how do I create a change event in the userform?
    Thanks in advance.
    Attached Files Attached Files

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

    Re: Formula too complex

    Since you're using the worksheet itself anyway to display your report, there's no real benefit to the popup userform, in my opinion, it's just more plumbing.

    Here's the same functionality (in VBA) but with no userform. Select a Month and a Customer using the drop downs and the values from those sheets will be displayed without visible formulas. If you select a month that doesn't exist yet, you'll simply get blank cells.

    You can hide the K:L lists if for appearance. I prefer the customer list on like this because you may have customers in September you did not have in August.

    The lists in K:L are dynamic, if you add/delete from the list (no blanks, please) then the drop downs will adjust themselves for you.
    Attached Files Attached Files
    _________________
    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!)

  4. #4
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Formula too complex

    Thanks very much for your response. I will work through it.

  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: Formula too complex

    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)

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