Note: The other languages of the website are Google-translated. Back to English
Log på  \/ 
x
or
x
Tilmeld  \/ 
x

or

Hvordan indstilles / vises forudvalgt værdi til rulleliste i Excel?

Som standard vises den generelle rulleliste, du oprettede, tom, inden du vælger en værdi på listen, men i nogle tilfælde vil du muligvis vise eller indstille en forudvalgt værdi / standardværdi til rullelisten, før brugerne vælger en fra listen som vist nedenstående skærmbillede. Her kan denne artikel hjælpe dig.


pil blå højre boble Indstil standardværdi (forvalgt værdi) for rullelisten med formlen

For at indstille standardværdien for rullelisten skal du først oprette en generel rulleliste og derefter bruge en formel.

1. Opret en rulleliste. Vælg en celle eller et område, som du vil placere rullelisten, her er K1, og klik data > Datavalidering. Se skærmbillede:
doc viser forvalgt værdi rulleliste 2

2. Derefter i Datavalidering dialog under Indstillinger fanebladet, vælg Liste fra Tillad listen, og vælg derefter den værdi, du vil vise i rullelisten til Kilde tekstboks. Se skærmbillede:
doc viser forvalgt værdi rulleliste 3

3. Klik derefter på Fejladvarsel fane i Datavalidering dialog, og fjern markeringen Vis fejladvarsel efter indtastning af ugyldige data mulighed. se skærmbillede:
doc viser forvalgt værdi rulleliste 4

4. klik OK for at lukke dialogen og gå til rullelisten og skriv denne formel = HVIS (J1 = "", "- vælg -") ind i det, og tryk på Indtast nøgle. Se skærmbillede:
doc viser forvalgt værdi rulleliste 5

Tip: I formlen J1 er en tom celle ved siden af ​​K1, sørg for at cellen er blank, og "--Vælg--"er den forudvalgte værdi, du vil vise, og du kan ændre dem efter behov.

5. Hold derefter rullelistecellen valgt, og klik data > Datavalidering at vise Datavalidering dialog igen, og gå til Fejladvarsel fanen og tjek Vis fejladvarsel efter indtastning af ugyldige data mulighed tilbage. Se skærmbillede:
doc viser forvalgt værdi rulleliste 6

7. klik OK, nu før brugerne vælger værdier fra rullelisten, vises der en standardværdi i den angivne celle med rullelisten.
doc viser forvalgt værdi rulleliste 7

Bemærk: Mens en værdi er valgt fra rullelisten, forsvinder standardværdien.
doc viser forvalgt værdi rulleliste 8



De bedste Office-produktivitetsværktøjer

Kutools til Excel løser de fleste af dine problemer og øger din produktivitet med 80%

  • Genbruge: Indsæt hurtigt komplekse formler, diagrammer og alt, hvad du har brugt før; Krypter celler med adgangskode Opret postliste og send e-mails ...
  • Super formel bar (let redigere flere linjer med tekst og formel); Læsning Layout (let at læse og redigere et stort antal celler); Indsæt til filtreret rækkevidde...
  • Flet celler / rækker / kolonner uden at miste data; Split celler indhold; Kombiner duplikerede rækker / kolonner... Forhindre duplikerede celler; Sammenlign områder...
  • Vælg Duplicate eller Unique Rækker; Vælg tomme rækker (alle celler er tomme); Super Find og Fuzzy Find i mange arbejdsbøger; Tilfældig valg ...
  • Præcis kopi Flere celler uden at ændre formelreference; Auto Opret referencer til flere ark; Indsæt kugler, Afkrydsningsfelter og mere ...
  • Uddrag tekst, Tilføj tekst, Fjern efter position, Fjern mellemrum; Opret og udskriv personsøgningssubtotaler; Konverter mellem celler indhold og kommentarer...
  • Superfilter (gem og anvend filterskemaer på andre ark); Avanceret sortering efter måned / uge / dag, hyppighed og mere; Specielt filter af fed, kursiv ...
  • Kombiner arbejdsbøger og arbejdsark; Fletabeller baseret på nøglekolonner; Opdel data i flere ark; Batch Konverter xls, xlsx og PDF...
  • Mere end 300 kraftfulde funktioner. Understøtter Office / Excel 2007-2019 og 365. Understøtter alle sprog. Nem implementering i din virksomhed eller organisation. Fuld funktioner 30-dages gratis prøveperiode. 60-dages pengene tilbage garanti.
kte-fane 201905

Fanen Office bringer en grænseflade til et kontor med Office, og gør dit arbejde meget lettere

  • Aktiver redigering og læsning af faner i Word, Excel, PowerPoint, Publisher, Access, Visio og Project.
  • Åbn og opret flere dokumenter i nye faner i det samme vindue snarere end i nye vinduer.
  • Øger din produktivitet med 50% og reducerer hundredvis af museklik for dig hver dag!
officetab bund
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Asad Shah · 8 days ago
    Hello, How can I get defined value limit in excel dropdown menu, like I want to Enter Apple in product against three name and it should not put 4th entry and give error if i do so, any solution please.
  • To post as a guest, your comment is unpublished.
    Asad · 8 days ago
    Hello, How can I get defined value limit in excel dropdown menu, like I want to Enter Apple in product against three name and it should not put 4th entry and give error if i do so, any soluition please.
  • To post as a guest, your comment is unpublished.
    miradek · 2 years ago
    hello, my data is about names and phone numbers. can make it if two names selected in one cells using data validations, the particular name which their name as selected, their phone numbers will be shown next to it.

    help me!
  • To post as a guest, your comment is unpublished.
    JStirfry · 2 years ago
    Hello!

    How can I set a data validation list such that if the drop down value in the cell is deleted, the cell will automatically show a default value (i.e. "-Select-")?

    For example, I have a worksheet with multiple drop down lists that I want to show a default value of "-Select-" once the sheet is opened. A user will select values from the lists that will impact the result of calculations throughout the entire spreadsheet. A user may accidentally "delete" the cell contents of the lists. If this happens, rather than the cell becoming blank, I want the cell to show a default value of "-Select-". This scenario occurs in multiple random locations throughout the spreadsheet, not just in one localized place.

    I was able to find the following VBA code so far, but it only applies the concept over a range, rather than just individual cells that contain drop down lists. The problem with what I have coded so far is that every single blank cell in the range ends up with "-Select-" in it. Some of the lists are in ranges, but some are also scattered throughout the sheet. The problem I'm having with my current code is that every single blank cell in the range ends up with "-Select-" in it. I'm trying to get this to apply over the entire worksheet to ONLY cells that are drop down lists.

    Is what I'm trying to accomplish even possible?

    Example file can be found here:
    https://drive.google.com/file/d/1VoO8VgFs3IJ0ALwqfk0i8gt69UE4vEKW/view?usp=sharing

    Example code:

    Option Explicit

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cel As Range
    ' If Target.Cells.Count > 1 Then Exit Sub 'turning this off allows multiple cells to be selected and deleted at the same time
    If Not Intersect(Target, Range("f2:p17")) Is Nothing Then
    For Each cel In Range("f2:p17")
    Application.EnableEvents = False
    If IsEmpty(cel.Value) Then cel.Value = "-Select-"
    Next cel
    End If
    Application.EnableEvents = True
    End Sub


    Thanks in advance!
  • To post as a guest, your comment is unpublished.
    Justin · 2 years ago
    How can I set a data validation list such that if the drop down value in the cell is deleted, the cell will automatically show the a default value (i.e. "-Select-")?

    For example, I have a worksheet with multiple drop down lists that I want to show a default value of "-Select-" once the sheet is opened. A user will select values from the lists that will impact the result of calculations throughout the entire spreadsheet. A user may accidentally "delete" the cell contents. If this happens, rather than the cell becoming blank, I want the cell to show a default value of "-Select-". This scenario occurs in multiple random locations throughout the spreadsheet, not just in one localized place.

    I was able to come up with the following VBA code so far, but I've only figured out how to apply the concept over a range, rather than just cells that contain a drop down list. The problem with what I have coded so far is that every single blank cell in the range ends up with "-Select-" in it.

    Option Explicit

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cel As Range
    ' If Target.Cells.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("f2:p17")) Is Nothing Then
    For Each cel In Range("f2:p17")
    Application.EnableEvents = False
    If IsEmpty(cel.Value) Then cel.Value = "-Select-"
    Next cel
    End If
    Application.EnableEvents = True
    End Sub
  • To post as a guest, your comment is unpublished.
    Dary · 4 years ago
    The idea is nice, but my problem is that if the dropdown value is deleted, it doesn't revert to the default.
    • To post as a guest, your comment is unpublished.
      zaid · 3 years ago
      I also have the same issue , please reply if you solved it
    • To post as a guest, your comment is unpublished.
      Scott · 4 years ago
      Exactly!!! I'm having the same issue, have you found a solution?
      • To post as a guest, your comment is unpublished.
        Alex · 3 years ago
        You can insert the function in that specific cell using VBA, make sure you call the insert function when workbook is opening.
        • To post as a guest, your comment is unpublished.
          Elizabeth Taylor · 2 years ago
          Only works if you speak VBA, not all of us code.