Forum Discussion

Ginnie_H39's avatar
Ginnie_H39
Copper Contributor
Apr 15, 2022

formula to auto entry an amount based on the kind

I am not sure the best way to describe what I am trying to do. I have different tables and I want to be able to enter a name then have it get a price from a different table and automatically an amount for that particular product. I am trying to enter an if formula but I can not figure out how to do the last part.

I need to have the price per ounce updated when the chemical name is inputted in the blue table it will auto populate from the table to the right for the correct chemical. Any help would be greatly appreciated. Thanks

8 Replies

  • Ginnie_H39's avatar
    Ginnie_H39
    Copper Contributor

    I am still struggling. I have one table that has a drop down list, when someone clicks on a name from the drop down list, I need the price per ounce to auto populate in that same table. I tried to use the following and get an error.

    =VLOOKUP([@[Chemical Name]],Table1[Chemical],Table1[per Ounce])

    If there is a better way to show this to you please let me know.

    Thanks for any help.

    • mathetes's avatar
      mathetes
      Gold Contributor

      Ginnie_H39 

       

      That VLOOKUP is incomplete.

       

      I think would be the correct formulation. Here's a screen grab on the correct syntax for VLOOKUP from one of my favorite on=line references ( https://exceljet.net/excel-functions/excel-vlookup-function )

       

      You have the formula written as =VLOOKUP([@[Chemical Name]],Table1[Chemical],Table1[per Ounce])

      It should be more along these lines

      =VLOOKUP([@[Chemical Name]],Table1,2,0)

      • In short, I think you're specifying the lookup_value correctly, but not the rest.
      • table_array would be simply "Table1"
      • column_index_num would be 2 for the second column of Table 1
      • and 0 would be requesting an exact match

      If making that change doesn't work, refer to the website I link to above. If you still can't resolve it, please post a copy of the actual spreadsheet either here or in OneDrive or Google Drive or the equivalent, and give us a link 

      • Dtrout16's avatar
        Dtrout16
        Copper Contributor

        mathetes I also am having this issue. I have a spread sheet with names, elevations and columns for each material with the quantity being used. I need to get the material quantities to auto populate when the elevation is selected from a drop down menu and can’t figure out how to get that to work. 

Resources