I have a dropdown list of items which are in a table with corresponding values. Below the dropdown list I have a VLookup to find the value of the item. I need to keep a count of the total value that these are worth. Once the dropdown list is selected I need the value of the VLookup copied and pasted into the next available cell in the column. Complicating this is that each column corresponds to a different person who can have items added to their total in any order.
When column B has an item selected I need to copy the value to the bottom of column B, similarly for column C, etc.
I know I need to do use onclick function but everything I have seen copies onto the next available row without keeping column discipline. Would I need to name each column and onclick function separately or is there a neater solution?
Related
I'm starting to use Excel VBA to create drop down lists using data validation but i would like to synchronize two drop down lists in the same worksheet.
I created the first list which is 1, 2, 3, 4, 5 and I created the second list which is A, B, C, D, E
My purpose is when I choose Item number 3 from the first list (which is 3) automatically the Item number 3 (which is C) from the second list will be displayed.
I tried to use the INDEX and MATCH fct but without success could you please help me with that
Thank you for your help
Hichem.
If you have a data validation drop-down in a cell, you shouldn't have a formula in that cell at the same time. As a rule, a cell should either be calculated or used for data entry, not both.
Using a formula, you can put the values you want to calculate in the second cell into the spreadsheet somewhere, if they are not already. Then you can use a simple Vlookup or Index/Match. For example, all drop-down list options are stored on a sheet called Setup. The values for the second data validation list are in the cells C2 to C6. The values for the first data validation list are in cells A2 to A6. You can now use the value selected in the data validation list like this:
=index(Setup!$C$2:$C$6,match(Sheet1!C2,Setup!$A$2:$A$6,0))
In words: in column A of the setup sheet, find the value that is the same as C2 in Sheet1 and return the value from column C of the setup sheet in the same row.
I am attempting to sort some data in order from Largest to Smallest value.
The data come in two columns: names and corresponding values.
The sorting method I use requires the following steps:
select the "data" tab in excel
select the columns (names and values) of the data to sort
click the sort button
select "sort by" as the column containing the values
select "sort on" as values
select "order" as Largest to Smallest
click "OK"
The values in the cells next to the names are defined by the reference cells above, listed as a row of numbers from 1 to 14.
I expect that when I sort the data from Largest to Smallest, it should look like Case B, where the numbers are sorted from Largest to smallest and the names follow the sorting and remain assigned to their value. Instead it looks like Case A, where the values assigned to each name now reference an entirely new and random reference cell (i.e. the row of cells above either case), as opposed to the correct reference cell.
Please note that Case B works because the values in the cells are truly numbers, not references to other cells WITH numbers in them.
Any help on this issue would be greatly appreciated.
referencing each cell requires isolating columns and rows, which can be done by pressing F4 upon selecting a reference cell.
I have a dropdown list of 104 values in column F. I want if any of the values is selected from that list cloumn, a corresponding value should be referenced from sheet and be inserted the cell in Column i .
If a value is selected in sheet 1 column F then it should match it with a similar value in sheet 2 columnA and also select the value corresponding value in Sheet 2 column B and go back and insert it in sheet 1 Column i.
Please note that each of the 104 values in column F has its corresponding value from a cell address of another worksheet
worksheet with dropdown list column F and inserted value column I
worksheet with referenced value
use Index/Match
=Index("select the data that you want displayed",match("common data", "common data",0))
I use this a ton when pulling data from multiple tabs.
=index(List of Customers,match(tab1_CustomerID, tab2_CustomerID,0))
hope this helps!
That calls the use of two possible functions:
The first is VLOOKUP, which you can find about in here:
https://exceljet.net/excel-functions/excel-vlookup-function
(please note the 4th parameter!!!!)
The second combination is index/match, which I think is more appropriate for your situation:
https://www.ablebits.com/office-addins-blog/2014/08/13/excel-index-match-function-vlookup/
Or here:
https://exceljet.net/index-and-match
Less theoretical but with the best explanation:
http://www.randomwok.com/excel/how-to-use-index-match/
more complicated but fits your purpose better
Index/match with more than one column to match against:
https://www.deskbright.com/excel/index-match-multiple-criteria/
I'm new to excel and I came across this problem.
I have a table with 2 columns one with the name of the item(the same name can appear multiple times) and next to it the quantity of said item.
What I want to get is the item which has the most overll quantity (keeping in mind that the object can appear multiple times in the table and have different quantities in each of the apppearences).
You didn't specify how you want to highlight the value.
Assuming your items are in column A and your values in column B.
Add a helper formula in column C to sum all the items.
=SUMIF($A$1:$A$100,A1,$B$1:$B$100)
you can use conditional formatting to highlight the highest value by adding a rule that uses a formula and entering;
=B1=MAX($C$1:$C$100)
It highlights every entry of the item with the greatest value.
To return the name of the item with the highest value you can use;
=INDEX(A1:A100,MATCH(MAX(C1:C100),C1:C100,0),1)
There are 2 parts to this formula
=INDEX(A1:A100,MATCH(MAX(C1:C100),C1:C100,0),1)
The match part finds the row number of the highest value and the Index part returns the value in column A for that row.
This solution may not be ideal if you have a huge amount of data so you could also try a pivot table and sort it highest to lowest.
Maybe I'm using ´VLOOKUP´ wrong, but I've tried even using a table array. It continuously returns a ´N/A´ or ´#REF´ error back to me.
The spreadsheet is setup with a sheet titled 'Character', ´C6´ is a drop down menu, and ´D6´ is where the ´VLOOKUP´ formula is being written. I have a 2nd sheet listed named, 'Weapon', which is a 13 row sheet with various different text and numerical data information. I'm only trying to pull the numerical data from the 6th row, or column F.
So, this is the function I'm writing:
´=VLOOKUP($C$6,Weapon!$A$2:$M$78,6,0)´
What's odd about this is if I check
´=VLOOKUP($C$6,Weapon!$A$2:$M$78,1,0)´
It will return the text data of the first result in the A column on the 'Weapon' sheet, but it won't return anything else in B,C,D,E,etc. columns if I change that 1 to a 2,3,4,5, etc.
Any insight would be great.
For VLOOKUPs to work, it's the lookup value that is the critical part. And that critical part has to be unique and it has to be in the first column. Your table of data on the Weapon sheet has "Staff" in Column A.
A quick fix for you is to change your formula to
=VLOOKUP($C$6,Weapon!$B$2:$M$78,5,0)
Notice the left-most column of the range is now column B and we're getting data from the 5th column.
This assumes that your values in column B are unique and will match up with the values in your drop-down menu in C6 on the Character sheet.