+ Reply to Thread
Results 1 to 7 of 7

Drop down list

Hybrid View

  1. #1
    Registered User
    Join Date
    06-07-2010
    Location
    Chino, CA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Drop down list

    I know how to make a drop down list in a cell or cells by using data validation; but my question is it possible through some sort of formula to, instead of an entire column to take the input of a column and remove all bold items (or any other feature of an item) so that only the plain text items are left for the drop down? Trying to accomplish this without macros.

    Thanks!
    Joe
    Last edited by WebKill; 06-08-2010 at 08:36 PM.

  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: Drop down list

    Welcome to the Forum

    Without using VBa I think the answer is no.

    If you need to do this, consider why?
    Would separate lists / sub-lists not serve your purpose?

  3. #3
    Registered User
    Join Date
    06-07-2010
    Location
    Chino, CA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Drop down list

    I'd like to be able to do this to limit the input for a particular column to be the non bold items in another column (the only valid input being the plain text cells in the other column). If there is a way to do this, how would it be done?
    Last edited by WebKill; 06-07-2010 at 07:40 PM.

  4. #4
    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: Drop down list

    Try this demo workbook

    It contains this code
    Option Explicit
    
    Sub DropDownFontValidationBold(BoldFont As Boolean)
        Dim LastRow As Long
        Dim i As Integer
        Dim ListBold As String, ListNormal As String, DDList As String
        
        LastRow = Range("A" & Rows.Count).End(xlUp).Row
        For i = 1 To LastRow
            If Range("A" & i).Font.Bold = True Then
                If ListBold = "" Then
                    ListBold = Range("A" & i)
                Else
                    ListBold = ListBold & "," & Range("A" & i)
                End If
            Else
                If ListNormal = "" Then
                    ListNormal = Range("A" & i)
                Else
                    ListNormal = ListNormal & "," & Range("A" & i)
                End If
            End If
        Next
        If BoldFont Then
            DDList = ListBold
        Else
            DDList = ListNormal
        End If
        With Range("C1:C" & LastRow).Validation
            .Delete
            .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
                       Operator:=xlBetween, Formula1:=DDList
            .IgnoreBlank = True
            .InCellDropdown = True
            .InputTitle = ""
            .ErrorTitle = ""
            .InputMessage = ""
            .ErrorMessage = ""
            .ShowInput = True
            .ShowError = True
        End With
    End Sub
    
    Sub DropDownFontBold()
        DropDownFontValidationBold True
    End Sub
    
    Sub DropDownFontNormal()
        DropDownFontValidationBold False
    End Sub

    Toggle the macros "DropDownFontBold" & "DropDownFontNormal"
    Check tthe result in Column C

    Add to or subtract from column A as you wish change font as needs be.

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-07-2010
    Location
    Chino, CA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Drop down list

    Hmm, looks nice. Is there a way to have it automatically run when I change tabs from one sheet to another? That way if the column is updated, the list will be updated when the user clicks a cell.

  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: Drop down list

    Hi I'm about 8hrs ahead of you, on the face of the earth that is, not with your problem!

    Might not manage to look into it tonight, can you look back tomorrow about the same time?

    Cheers

  7. #7
    Registered User
    Join Date
    06-07-2010
    Location
    Chino, CA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Drop down list

    I got it figured out, thanks!

+ 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