+ Reply to Thread
Results 1 to 13 of 13

Data Validation

  1. #1
    Registered User
    Join Date
    06-30-2011
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    13

    Data Validation

    Years ago I created a sheet with validation ( see eg ) Range = code located on sheet Codes
    in colum 'A' a drop down validation box, select g/l code list ( is made from gl = description)
    the value returned is the value in the left column of the range.
    How do I do this again, I need to use the idea but in another sheet.
    Thanks in advance
    Roger
    Attached Files Attached Files
    Last edited by hawke1935; 07-09-2011 at 11:56 PM. Reason: attachment

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Data Validation

    Hmm?

    It seems to me that you want to see in the drop-down in "Itemized Expenses" Column A to show the "G/L Code" and its' "Description", but only Return the "G/L Code"

    To achieve this you have Concatenated "G/L Code" & Space & "Description", in Sheet "Codes", and named the range "code". Then used this to display the "Long Description" in the drop-down.
    The definition of this name is probably better being dynamic.

    Name "code"
    Refers to:=
    Please Login or Register  to view this content.

    Data Validation for "Itemized Expenses" A2 down

    Allow:= List
    Source:=
    Please Login or Register  to view this content.

    To get this to return the "G/L Code" only, you have used the VBa Change Event for Sheet "Itemized Expenses" to lookup the "Long Description" in Sheet "Codes" and return the corresponding "G/L Code", this therefore over-rides the validation list.

    If your "G/L Gode" has no spaces, then this, in the Change Event, might be a little easier
    Please Login or Register  to view this content.

    The formula you are using in "Constructed Key Field" is perhaps tidier as
    Please Login or Register  to view this content.

    Hope this helps.
    Last edited by Marcol; 07-09-2011 at 11:45 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    06-30-2011
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Data Validation

    Thanks for the quick reply.
    However the code does not work as expected. The VB code does not have any referance to the range ( code )
    I've attached the actual spreadsheet I'm working with as it may shed some light on what I'm trying to do.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation

    Hi hawke1935

    I don't have a real good sense of what your trying to do. Based on my understanding, this code may work for you.
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Registered User
    Join Date
    06-30-2011
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Data Validation

    Thanks John for the reply, really appreciate the help in the forum.
    Let me explain maybe in detail.

    On the validation sheet column A contains G/L Codes. Column B contains G/L Codes + the G/L description.

    ON the detail sheet in column F , I have formatted for a Validation drop box to display the contents from the Validation sheet column B ( also known as range CODE )

    Now, when you select a item from the drop box on the detail sheet in cell F9 say " the first item: 261 Asbestos Inspection " I want the the corresponding value in column A, of the validation sheet , in this case "261" to be placed in column F9 on the Detail sheet.

    Hope I detailed this out properly.
    Thanks again for the help
    Roger

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Data Validation

    Hmm?
    Referring to your first post
    Years ago I created a sheet with validation .... How do I do this again .... ?
    Perhaps you should have asked a somewhat different question, for example the one you now pose?

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation

    Hi Roger

    I'm an OLD retired CPA...I ALMOST understand what you MIGHT want.

    Alrighty, in your example, F9 will contain "261". What will E9 contain?

    An even a more "pregnant" question...is this a** backward?...do you wish F9 to be populated based on what you've chosen in E9?

  8. #8
    Registered User
    Join Date
    06-30-2011
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Data Validation

    I think you do understand, I want to use the drop box and have it insert "261" in F9. remember that the drop box displays from a list that is a conatation of 2 columns.

    The entry in E9 was the result from the VBA code I inserted in the code sheet from a previous member in the reply. It was a result that I had not considered, may or may not keep, not really neccessary .

    Roger

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation

    @ Marcol

    Sometimes things aren't readily apparent...we, you and I and hawke1935 will get it figured out.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation

    Hi Roger

    So you wish F9 to display ONLY the GL code? If true, I'll think on it but will probably suggest a different approach. OK?

  11. #11
    Registered User
    Join Date
    06-30-2011
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Data Validation

    Tks

    Roger

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Data Validation

    Hi Roger

    I expect you'll need much more from this but perhaps this'll be a start
    Please Login or Register  to view this content.
    Select your Dropdown from Column E. Let me know how I can help.

  13. #13
    Registered User
    Join Date
    06-30-2011
    Location
    BC
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Data Validation

    Its another way to do it, but it works elegantly. Thank you all who helped.

    Roger


    Also check out the attached workbook, especially the itemized expenses, and see how the GL code works
    Attached Files Attached Files
    Last edited by hawke1935; 07-10-2011 at 12:30 AM.

+ 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