I want to autofill an Excel row using a variable - excel

So I currently I have a Excel sheet and what I want it to do, is lookup data that is provided on another sheet and autofill it in regards to it. I'll try to explain what I mean below.
So for example columns 1, 2 and 3 would be empty, after a code 1 is typed into column 123 I'd want columns 1, 2 and 3 to update to the values provided. It would link up to another sheet shown below and I'd like it to expand dynamically so as if more data were to be added to the below sheet it would still update.
I apologise if this sounds confusing but I've tried looking everywhere for functions that will be able to help me out. The only solution I've gotten is a VERY long nested if statement which I'm certain is the worst way to approach this.
first table is called "Autofill"
the second table is "Details"
the worksheet to be filled is called "Sheet1"
the one containing the details is called "Details"

I managed to solve it simply using vlookup on the other sheet and matching the rows

Related

Excel Help: Dynamic range + Data Validation

I got a problem with some popular Excel question, dynamic ranges and data validation drop-downs and auto-populate. Lets say I got 2 sheets, and on one sheet I got drop-downs to choose from another sheet, and that is not a problem when I define cells and range using:
=OFFSET($A$19;;;COUNTA('0528 - info'!$E$2))
..but what about when I wanna add some new cells in between,so that they can be automatically recognized in which group they belong:
As you see for instance Column B has some "groups" where you can find more different "values" like in Column C, like Power Supply has MV1 and MV2... and so on. My drop-downs on the sheet 1 are called exactly like this "groups" and I did reference them manually using given function. But is it possible to populate my drop-downs automatically when I add for instance MV3 beneath MV2 in this table? Or RN7 on 14th row? Everytime I add new values I have to extend my dropdowns (what is fine..), but problem will be when I share this table to others, they gonna forget it 90%.
I hope you get my point, any suggest will be fine!
p.s. Indirect doesnt work in a way it should - It gives me all instances from the Column but not specific ones that I need.
=INDIRECT("Table4[VarEDS]")
Well this option gave me again what I already had before - all "matches" from the Column and still not ONLY matches that are for certain group. ...
If your Data Validation source is a "Table" as shown in your image then you can take advantage of "Table Column" Range which is dynamic. That means whenever you refer that column as NAMED range and if make changes to the column (Edit, Add, Delete) it will reflect in the referred cell.
You can use this technique even for ranges not in table. You need to NAME them with offset formula and make dynamic.
You can find dynamic address of your column as shown in the image below. Select entire column WITHOUT Header
Name your column data range with appropriate name as shown in image below
Then in Data Validation Window refer this name using F3 as shown in image below.
Then you can see... Even if you edit, add or delete any row in the column the data validation will change
Editing based on your comment below: If you want text from column B and Column C appear together in the validation dropdown list. Insert column in the table and join text from column B and C and then make data validation based on that column as shown in Colum D in image below
Finally I think I understood your question.
Watch this video
Excel: Find Multiple Matches & Dependent Drop Down List
After some days of searching and trying I got what I wanted - wasnt wasy job at all. Needed to combine more functions with the help of couple of videos from Leyla (Xelplus):
https://www.youtube.com/watch?v=gu4xJWAIal8
https://www.youtube.com/watch?v=7fYlWeMQ6L8&t=5s
First step was to make unique list of my values (text in my case) on separate sheet:
=IFERROR(INDEX(t_VarGroup[Vargrouptext];MATCH(0;INDEX(COUNTIF($J$2:J2;t_VarGroup[Vargrouptext]););0));"")
Then I needed to "extract" all the values that are belonging to the certain unique values:
=#IF($I3<COLUMNS($K$2:K$2);"";INDEX(t_EDS[[VarEDS]:[VarEDS]];AGGREGATE(15;3;(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)/(t_VarGroup[[Vargrouptext]:[Vargrouptext]]=$J3)*(ROW(t_VarGroup[Vargrouptext])-ROW(t_VarGroup[[#Headers];[Vargrouptext]]));COLUMNS($K$2:K$2))))
FUrthermore, I created Unique drop down list:
=OFFSET($J$3;;;COUNTIF($J$3:$J$14;"?*"))
And then dependent drop down list nearby using:
=OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;COUNTIF(OFFSET($K$2;MATCH($H$2;$J$3:$J$17;0);;1;20);"?*"))
And because I made it on other sheet, I had to reference them to an appropriate sheet name where my main sheet is - with drop downs, it is actually very useful for my future work and for everyone else who has struggling with drop downs but on a bit specific way =))
credits to: #Naresh Bhople for suggestion about Youtube videos.

Excel, combining two sheets on a third sheet by matching names [duplicate]

This question already has an answer here:
Lookup a value that matches a key in one column then apply that as a key to return a value from a third column
(1 answer)
Closed 4 years ago.
I am working on creating a database of information based on 2 spreadsheet. What is in common about them is that they have the names of people. However, not everyone has data/information for all the other columns. Is there a way to write a formula or code it so that I can get information to populate in a third sheet to say if the names are the same put this information here? I've put an example below. sheet 1 is name and location, sheet two is name is number, and sheet three is what I would like it to look like as an end product.
picture of what im going for
As the comment above mentions, you can use VLOOKUP (or INDEX/MATCH) for this. I would also wrap the entire statment in an IF and ISERROR so if there isn't a match it will return a empty string.
Something like this:
IF(ISERROR(VLOOKUP(G4,$D$2:$E$3,2,FALSE)),"",VLOOKUP(G4,$D$2:$E$3,2,FALSE))
Assume col A:B is your location table, D:E is your Number table, and G:I is the combined table where you put your VLOOKUPs
See this image for example

Excel Pivot Table Sorting using Multiple Fields and No Grouping

I have an Excel Workbook with contact information on one worksheet and a form on another. I want to create another worksheet that has a filtered set of the contacts FULLNAME to display in a list on the form worksheet. I have it working with a pivot table with FULLNAME but I can't add a sort on LASTNAME without grouping the items, which is not what I want. Any suggestions that doesn't include data duplication
UPDATE:
So I have it partially working the way I want it with this method. The below image is a piviot table based on a table in a worksheet. You can see that the names are sorted by first name. I would like them sorted by last name
So when I add the last name to the Piviot table so I can sort by last name, of course it groups the data like so, which is expected.
which gives me this result in my form list
as you can see the Last Name Grouping entry also shows up in the list which is not desirable.
UPDATE:
Using Andreas solution below and a couple other modifications I was able to complete this problem. I'm posting a completed solution because I know someone else will need it.
So using Andreas solution in the image below it gave me the first set of data to the right of my pivot table. As you can see it has spaces and will be unsightly binding that table to a list. So using the following macro function I was able to create column 3 data with no spaces. The function is as follows...
=IFERROR(INDEX(SortedSpacedRange,SMALL((IF(LEN(SortedSpacedRange),ROW(INDIRECT("1:"&ROWS(SortedSpacedRange))))),ROW(A1)),1),"")
Rather than using ranged data in the function I created a table out of the second column data called "SortedSpacedRange". This allows me to use it across multiple sheets better. Don't forget to use Ctrl+Shift+Enter to insert the function.
As you can see below I now have a last name sorted list with no spaces other than the one I placed purposfully in the first row of the unspaced table.
I hope someone finds this useful. Thanks again Andreas
Now I see what you need.
Only a few days ago I asked how to sort out items from a pivot table here:
https://stackoverflow.com/questions/39383971/how-can-i-detect-pivot-table-new-items
What you need is:
Function IsItem(c)
If c.IndentLevel <> 0 Then ' I think this will work, not tested. Typing on my phone
IsItem = True
Else
IsItem = False
End If
End Function
This will return true/false if the item in the pivot table is a new item or a "sum".
So in a new column next to the pivot table use the following formula:
EDIT: it obviously is not A1 the pivot table starts at, my bad. Just replace the cell with whatever cell is the first one. END OF EDIT.
EDIT 2: I see now that it's A4 that is the first one. END OF EDIT 2.
=if(A4="","",if(IsItem(A4),A4,""))
It first looks at the cell and if it's empty the return empty.
If not empty it looks at the value and if it is the full name (not only lastname), it will return the name, else empty.
Now if you fill down this formula, you should have a list of only the full names that you can use in your form list.
The vba code should be placed in a module and the file needs to be saved as macroactivated workbook xlsm before you add the formulas on the sheet.

Nested References in Excel

I'm working on a three sheet Excel spreadsheet that needs to be "idiot-proof" (Someone chooses an option from a drop-down menu and the formula fills itself in).
So in the first sheet, there are lists of ratios that are used to look things up in tables located in the second sheet; the locations those tables are associated with the drop-down list.
Here's where it gets fun: the new piece I'm adding in the second sheet has 5 tables associated with it. So one ratio from the first sheet picks the table, and another one is used to interpolate on that table. The third sheet is being used to store the calculated table location - Match() is used to pick the table, nested if statements to get the row number associated with it. I used Address() to get the actual location in sheet 2 listed in sheet 3.
I need an array in my interpolation function, being in the first sheet. I've been trying anything to get the same result using formulas as if I went to sheet 2 and physically selected the boxes I need. What looks most promising so far is Index().
D31 in sheet 3 contains the address of the upper left of the table in Sheet 2, and G31 has the bottom right.
INDEX(Sheet3!$D$31:Sheet3!$G$31,0,1)
http://office.microsoft.com/en-us/excel-help/index-function-HP010342608.aspx
The thing is, this is giving me the items in Sheet 3 as the array, and still not letting me access Sheet 2 from that.
Does anyone have any ideas? I've run completely out. Thank you in advance for any help :)

Dupplicating data to to match up with a drop down list depending on what has been selected

Right I've spend all day looking / trying to find something that could do this, could someone please point me in the right directions please.
please note im using office 2013
I have a Drop down list on Sheet 2 which pulls data from sheet 1 and then changes the values on sheet 2 by using Vlookup, depending on what has been selected from the drop down list.
However there is a variably column on sheet 2 that needs to be changeable which effects one of the Vlookup points of from sheet 1.
so i was thinking for example
IF sheet1A2 = sheet2A2 Then sheet2b2 = sheet1b2
therefore saying if the two drop down values on both sheets match then output the same value in the same row on sheet 1, therefore allowing the data to move up and down the column on sheet 1 depending on what has been selected on sheet 2.
I've not done VBA and excel in ages so very rusty btw
Thank you for the Help.
I have managed to fix it thanks anyways.=IFERROR(VLOOKUP($A12,'Proposed Rations'!$A$2:$J$15,MATCH($P$1,'Proposed Rations'!$A$1:$J$1,0),0),"")" was the item that i needed.

Resources