+ Reply to Thread
Results 1 to 2 of 2

Listbox or dynamic list

Hybrid View

  1. #1
    Registered User
    Join Date
    01-14-2013
    Location
    Londo, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Listbox or dynamic list

    well i have a worksheet like this:


    in the B1, C1, D1 E1, etc i have dates
    in A2, A3, A4, A5, A6, etc i have error codes and in B2, B3,C2, C3,D2,D# i have the values of the amount of that error codes in that dates.

    this worksheet is like a matrix, you have the values of the error codes for each date.

    in another sheet i want to have a dropdown list with the values of B1,C1,D1,E1, but this list has to be dynamic because im adding each day another date and i dont want to extend the range all the time.
    i find this:

    =OFFSET($A$2,0,0,COUNTA($A$2:$A$200),1)
    but i think this list only works when you have the values of the list in A1,A2,A3, and not in A1, B1, C1.

    other thing i want to know is if i put a listbox on the other sheet, when i insert a new date can i add by code a value to a listbox in another sheet? (i think this is more portable and "updatable")

    thanks for all!

  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: Listbox or dynamic list

    You need to pull apart the OFFSET() formula so you understand what each parameter does. In your example above the COUNTA() function is in the [height] parameter, so it searches rows. You can move that over to the next field with is the [width] parameter and your expansion will be horizontal instead of vertical.

    =OFFSET($A$2, , , , COUNTA($B$1:$LA$1))
    _________________
    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!)

+ 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