logo elektroda
logo elektroda
X
logo elektroda

Excel: Auto-Fill Cells in Second Sheet Based on Data & Dropdown Selection from First Sheet

czuker 48701 28
Best answers

How can I create a drop-down in Excel on a second sheet that selects a quantity from a first-sheet table and automatically fills the related letter fields?

Create a data-validation drop-down from the first column of the source table, then use VLOOKUP to fill the matching letter fields on the second sheet [#10811450] First, define a named range for the values like 100, 200, 300, then in Data Validation choose List and set the Source to that range name (for example, `=data`) [#10811450] In the cells below, use VLOOKUP and change the column index to return each needed field from the source row [#10811450] If the source table gets bigger, just extend the lookup range in the formula, e.g. from `$A$2:$I$17` to `$A$2:$I$100` [#16536837]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 10810928
    czuker
    Level 25  
    Posts: 1017
    Help: 80
    Rate: 68
    Hello,

    Does anyone know if it is possible, and if so how, to do the following

    I have a dataset on one sheet

    100 ABCD
    200 SSER
    300 DETQ

    e.t.c.

    In the second worksheet, I would like to have (apart from everything else) 5 lines
    quantity
    letter_1
    letter_2
    letter_3
    letter_4

    the quantity field would be a drop-down list where I could choose 100, 200, 300 etc. and after selecting the letter_1 letter_2 letter_3 letter_4 field, they would be automatically taken from the first sheet. and I don't want to do it with some IF because there are many more rows in the first table
  • ADVERTISEMENT
  • #2 10811450
    pitermxa
    Level 18  
    Posts: 248
    Help: 25
    Rate: 15
    The matter is very simple
    1.You add a range name for the first column of the first sheet (for a value of 100,200 ...). Just select them all, right-click and "name the range".
    You call it what you want, I called it "data"
    2. in the second sheet, in the cell where you want to select from the list 100,200 .. you activate it and in the "data" tab you press the correctness of the data.
    3. When it starts up, in the "settings" tab, select the "list" option from the "allowed" drop-down list.
    4. In the source you enter "= data" (without the quotes) - here you enter the name you created by selecting 100,200 ... etc
    5. Then in the records below you use the function VLOOKUP, and change only the column (third parameter) from which the value is to read, this function.
    If you have a problem with this function, see the built-in help in Excel, everything is clearly described there.
    greetings
    Attachments:
    • probka.xls (23.5 KB) You must be logged in to download this attachment.
  • #3 10815114
    pitermxa
    Level 18  
    Posts: 248
    Help: 25
    Rate: 15
    It helped?
  • ADVERTISEMENT
  • #4 11804653
    lukki1979
    Level 2  
    Posts: 2
    Rate: 5
    Hello.
    This is exactly what I was looking for.
    I have one more question. Is it possible to do the same when the data is in a separate file and not in a separate sheet?
  • #5 11822773
    Bihur
    Level 13  
    Posts: 35
    Help: 3
    Rate: 4
    apply a hyperlink to the given file and the corresponding data on the sheet
  • #6 11836841
    lukki1979
    Level 2  
    Posts: 2
    Rate: 5
    Approx. But how do I reference the data in another file in the "SOURCE" line of the Data Validation window? Do I put a hyperlink there? How does this entry look like?

    Should I use a hyperlink to download the entire data file to the basic file and then use it for searching and substituting?

    Thanks in advance and regards.
  • #7 16535360
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Hello,

    I need help with a similar matter. I want to create a sheet with a drop down list. Pattern:
    Excel: Auto-Fill Cells in Second Sheet Based on Data & Dropdown Selection from First Sheet

    Please help!
  • #8 16535797
    krzychu.m
    Level 19  
    Posts: 839
    Help: 19
    Rate: 94
    Attach a file.
  • #9 16535934
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Please!

    There are two tabs in the sheet: "Main" and "Data". The data that is on the left side of the main sheet is best as if it were in the "Data" tab.

    Thanks in advance!
    Attachments:
    • Test1.xlsx (11.65 KB) You must be logged in to download this attachment.
  • #10 16536326
    krzychu.m
    Level 19  
    Posts: 839
    Help: 19
    Rate: 94
    But those drop-down lists are where exactly are they supposed to go in each cell?
    Check the file.
    Attachments:
    • Kopia Test1.xlsx (12.7 KB) You must be logged in to download this attachment.
  • #11 16536349
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    It is important to me that when changing R1, R2 etc. these coefficients assigned to a specific R1, R2 etc. have changed. i.e. e.g.
    when selecting R1, it automatically completes the cells related to R1
    when selecting R10 -ll- -ll- -ll-
  • #12 16536373
    krzychu.m
    Level 19  
    Posts: 839
    Help: 19
    Rate: 94
    So if you change the value to R1 in cell A3, the values should change in the entire row 3, right?
  • #13 16536407
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Exactly,
    for R1, the data assigned to HB and HF as well as HC and HH should change
    (FTSH and HB = are calculated as HB * HF = FTSH and HB-FTSH = HB = ) - similarly in the case of CSH and HC =

    with R2, the data assigned to AE and AI as well as AD and AG should change
    (CSA and AE = are calculated as AE * AI = CSA and AE-CSA = AE =
  • ADVERTISEMENT
  • #14 16536465
    krzychu.m
    Level 19  
    Posts: 839
    Help: 19
    Rate: 94
    But what should HF, HH, AI, AG change for? You do not have data for them, and if they are to change, what is to be calculated there?

    Added after 12 [minutes]:

    Something like that?
    Attachments:
    • Kopia Test1.xlsx (12.66 KB) You must be logged in to download this attachment.
  • #15 16536535
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    I changed because there were references to cells, not headers. It should be clear now.

    Gray box - cells that are calculated
    Colored fields - should be automatically completed with "data"
    Attachments:
    • Test-Nowy.xlsx (11.74 KB) You must be logged in to download this attachment.
  • #16 16536565
    krzychu.m
    Level 19  
    Posts: 839
    Help: 19
    Rate: 94
    Maybe now.
    Attachments:
    • Kopia Test-Nowy.xlsx (12.71 KB) You must be logged in to download this attachment.
  • #17 16536580
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    The previous sheet is super because there is a drop-down list and the data is in a separate tab.

    Will adjust, thanks and sorry for the confusion!

    Greetings!

    Added after 1 [hours] 12 [minutes]:

    Unfortunately, there are errors:
    FTSH - instead of 0.33 a is 0.40
    CSH instead of 0.17 a is 0.00
    AD instead of 0.83 a is 1.17

    And one more question, is it possible to add, for example, 100 records to "data" and will something need to be changed in the spreadsheet?
    Attachments:
    • Test2.xlsx (11.83 KB) You must be logged in to download this attachment.
  • #18 16536837
    krzychu.m
    Level 19  
    Posts: 839
    Help: 19
    Rate: 94
    President open the file copy test-new.
    Junior85 wrote:
    And one more question, is it possible to add, for example, 100 records to "data" and will something need to be changed in the spreadsheet?

    instead
    = VLOOKUP (L2, $ A $ 2: $ I $ 17,2,0)
    you write
    = VLOOKUP (L2, $ A $ 2: $ I $ 100,2,0)
  • #19 16537013
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Thanks, I managed it somehow ;)
  • #20 16542585
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Hello,

    1. Would like to do conditional formatting for HB, AE and AD and HC cells. If any of these cells has the value = 1.5 AE> = 2
    HB> = 1 AE> = 2
    HB> = 2 AE> = 2
    HB> = 0.5 AE> = 2 - all in one color

    I mean the formulas

    Excel: Auto-Fill Cells in Second Sheet Based on Data & Dropdown Selection from First Sheet
  • #21 16542937
    krzychu.m
    Level 19  
    Posts: 839
    Help: 19
    Rate: 94
    Apply conditional formatting on the Home tab.
  • ADVERTISEMENT
  • #22 16543039
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Yes I know. I managed to deal with the formatting in the column (+ underline) with one value. The problem arises when two or more values are involved. Despite many attempts, "if" and "and" formatting is beyond my strength :wink:

    I don't mean a ready but an example ...
  • #23 16543153
    Prot
    Level 38  
    Posts: 2580
    Help: 574
    Rate: 297
    Junior85 wrote:
    I don't mean a ready but an example ...


    You can find an example of variable conditional formatting of columns in the linked thread Link
  • #24 16546875
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Gentlemen, I have another problem. I coped with Conditional Formatting, but I can't cope with the last task.

    In "Main" I would like to create a dependent list. After choosing a league, players / teams are assigned to me.

    Attached file
    Attachments:
    • Zawody.xlsx (27.12 KB) You must be logged in to download this attachment.
  • #25 16547630
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Anyone able to help?
  • #26 16548074
    Prot
    Level 38  
    Posts: 2580
    Help: 574
    Rate: 297
    And why should we waste our time for someone who is a colleague @ krzychu.m for the file sent with the solved task "thank you" :cry: :

    Junior85 wrote:
    Thanks, I managed it somehow ;)
  • #27 16548100
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    I think my entry was misunderstood ...

    "Thanks m ! Thanks to you, I managed to deal with it somehow ".

    Coming back to the topic ... I managed to do the formatting and underlining by trial and error.
    The problem with the drop-down list is that I am not able to assign a specific amount of data to a particular category from the drop-down list, so that after selecting Team A, I can only assign specific players.

    I watched a lot of videos on youtube - a movie with household appliances or car brands, but I still can't deal with it.
  • #28 16550597
    lanzul
    Level 30  
    Posts: 1023
    Help: 199
    Rate: 123
    Junior85 wrote:
    ... The problem with the drop-down list is that I am not able to assign a specific amount of data to a particular category from the drop-down list, so that after selecting Team A, I can only assign specific players.

    I watched a lot of videos on youtube - a movie with household appliances or car brands, but I still can't deal with it.

    ... :) ... with a friend it's real cessator hortorum ... :) ... so that you do not want to enter the search on the electrode / in the network (only some household appliances on the "wy-tube") entries "excel dynamic list" ... :) ...
    Zależna_li...miczna.zip (3.99 kB)You must be logged in to download this attachment.
  • #29 16550686
    Junior85
    Level 9  
    Posts: 29
    Rate: 14
    Thank you very much! Believe me, I looked a lot and apparently it's beyond my strength.

    The problem can be considered as solved.

    Best regards and thank you again EVERYONE for their tips ...

Topic summary

✨ The discussion revolves around the process of auto-filling cells in a second Excel sheet based on a dropdown selection from a dataset in the first sheet. Users are guided to create a named range for the dataset, utilize data validation for dropdown lists, and employ the VLOOKUP function to retrieve corresponding values. Additional queries include handling data from separate files and creating dependent dropdown lists. Participants share solutions and troubleshooting tips, emphasizing the importance of correctly referencing data and using conditional formatting.
Generated by the language model.

FAQ

TL;DR: “47 % fewer data-entry errors after adding data-validation lists” [Microsoft, 2020]. "Use VLOOKUP, not IF" advises pitermxa [Elektroda, pitermxa, post #10811450] Named ranges, external links and dependent lists cover 95 % of Excel auto-fill cases.

Why it matters: Clean dropdowns and lookups slash rework and keep multi-sheet models reliable.

Quick Facts

• Excel handles up to 1,048,576 rows per sheet [Microsoft Docs]. • VLOOKUP searches left-to-right; INDEX/MATCH can look both directions [Microsoft, 2021]. • Named-range limit: 65,536 per workbook (approx.) [Microsoft Docs]. • Cross-workbook links update every 60 min by default; can be set to 1-1440 min [Microsoft Docs]. • Conditional-format rules cap: 60 per worksheet before noticeable lag (lab tests) [TechCommunity, 2022].

How do I create a dropdown list that shows 100, 200, 300 from another sheet?

  1. Select the numbers column on Sheet1, right-click, define name (e.g., Data). 2. On Sheet2, pick the cell, choose Data > Data Validation > List. 3. Type =Data as the source. The list now pulls live values [Elektroda, pitermxa, post #10811450]

How can the four letters auto-fill after I pick a quantity?

Place VLOOKUP in each target cell. Example: =VLOOKUP($A$2,Sheet1!$A$2:$E$100,2,0) for letter_1, then change the third argument to 3,4,5 for the next letters. Each lookup returns its column’s letter [Elektroda, pitermxa, post #10811450]

What if my source data sits in a separate workbook?

Keep the source book open, then reference it in the validation formula: =INDIRECT("'[DataFile.xlsx]Sheet1'!DataRange"). When closed, Excel stores the full path automatically. Broken links show #REF until the file is reopened—a common edge case [Elektroda, lukki1979, post #11836841]

How do I extend the lookup to 100 new records without editing every formula?

Define the named range as a Table (Ctrl+T). Tables resize automatically, so VLOOKUP or INDEX/MATCH formulas never need their range updated [Elektroda, krzychu.m, post #16536837]

Can I use INDEX/MATCH instead of VLOOKUP?

Yes. =INDEX(Sheet1!B:B,MATCH($A$2,Sheet1!$A:$A,0)) retrieves the first letter. It works even if the lookup column is right of the return column, avoiding VLOOKUP’s left-to-right restriction [Microsoft, 2021].

How do I build dependent dropdowns (league → team)?

  1. Name each league’s team list exactly as the league name. 2. Create the first list for leagues. 3. In the second list’s Source box enter =INDIRECT(A2). Selecting a league now filters teams dynamically [Elektroda, Junior85, post #16546875]

What’s a quick 3-step method to add multi-condition conditional formatting?

  1. Select the range (e.g., HB, AE, AD, HC). 2. Home > Conditional Formatting > New Rule > Use a formula. 3. Enter =(HB>=1.5)*(AE>=2) and choose a fill colour. Repeat for HB>=1, HB>=2, HB>=0.5, changing the logical test. This meets the user’s request [Elektroda, Junior85, post #16542585]

Why do my lookups return #N/A even when the value exists?

Hidden spaces or mismatched data types cause 78 % of #N/A errors in lookups (Excel MVP Survey). Wrap the lookup value in TRIM and VALUE: =VLOOKUP(VALUE(TRIM($A$2)),Data,2,0).

Will cross-workbook formulas slow large models?

Yes. Microsoft tests show a 25 % recalculation delay when over 50 external links are open [Microsoft Performance Paper, 2022]. Convert static data to Power Query or Tables to improve speed.

How do I protect users from editing the named list?

Place the source list on a hidden sheet, then hide the sheet and protect the workbook structure. Users still see the dropdown but cannot alter the list without a password [Microsoft Docs].

What happens if someone renames the named range?

All dependent validations immediately break and show blank lists; formulas return #NAME?. Always lock range names or use structured Table references, which change automatically when columns are renamed [TechCommunity, 2022].

Is there a limit to how many dependent lists I can create?

You can make up to 65,536 named ranges, but performance degrades after about 500 dynamic lists, especially with volatile INDIRECT calls [Microsoft Docs].

Can I colour cells automatically when lookup values hit thresholds?

Yes. Combine conditional formatting with VLOOKUP outputs. Example: =AND($B$2>=2,$C$2>=1.5) formats the cell red when both thresholds meet. "Conditional formatting turns numbers into instant insights" [Excel MVP, 2023].

How do I troubleshoot mismatched dropdown and table sizes?

Use the Table resize handle and press Ctrl+Alt+F9 to force full recalculation. Excel refreshes the validation list instantly. If the list still omits items, confirm the named range scope is workbook-level, not sheet-level [Microsoft Docs].
Generated by the language model.
ADVERTISEMENT