MS Excel - Get multiple results based on same values in a column - excel

Basically my problem is that I have an integer (1) in one cell in excel, and I want to show all the rows from an another worksheet, where the first column has the same integer (1).
Example of Worksheet 2
Slot Data1 Data2
1 15 124
2 20 23
1 89 523
3 20 23
Now I want to scan the Slot column for 1 and then populate the cells with the values under Data1.
I have tried to work with functions INDEX and MATCH, but the problem is it gives back only the first row where the Slot column has 1
My function is: =INDEX('Worksheet2'!DATA1:DATA1;(MATCH(1;'Worksheet2'!SLOT:SLOT)))
This function search in Worksheet 2's SLOT column for the integer 1 and gives back the value of DATA1 from the same row.
In this case we've got back 15 as result. The only problem is, this function only finds the first row with the value 1 in SLOT's column, but I want to get back all of the rows having 1 as SLOT.
How can I get 15 also 89 as result - maybe in another cell in Worksheet 1? Do I need to use VBA on this?
(I'm using Excel 2013)

You will have to transcribe this to your named ranges with worksheet scope.
=IFERROR(INDEX(DATA1, SMALL(INDEX(ROW(SLOT)+(SLOT<>1)*1E+99, , ), ROW(1:1))), "")
Fill down for the second, third, etc. matches.

Related

First non blank value in a row, where row number is dynamic

I have a range say A1:E5 in Excel and now in this column has values and some are null. My question is I will give the row number dynamically to the function and for that row the function should give me the first non blank value?
1 2 3
Row1 23
Row2 67
When i give 2 it should return 67, when i give 1 it should give 23?
Try this:
=INDEX($A$1:$E$5,H1,AGGREGATE(15,6,COLUMN($A$1:$E$5)/((ROW($A$1:$E$5)=H1)*($A$1:$E$5<>"")),1))
So the AGGREGATE() Function is Creates an array of Column numbers and Errors. When the Row number does not match H2 and/or the cell is empty it will return a divide by 0 error.
The first part of the AGGREGATE function 15 tells it we are looking for the small. The second, 6, tell it to ignore the errors, so no we have an array of only those column number that did not error. In H2's case it has an array of {2,3,4,5} from which it sends back the smallest to the Index Function.
The Index Function has three parts. The first is the Range. The second the row of that range, hence the H1. The third is the column Which we get From the Aggregate Function. In this case it would return 2 because it is the smallest.
So the Value that is at row 2 and column 2 in the range selected is 23.

Excel formula for multiple conditions and worksheets

The aim
I am try to create a formula which will allow specific information from 90 different worksheets, with an example of one such worksheet being below. Each work sheet represents data from a participant.
I want the data from the 90 work sheets to be summarised into the worksheet below.
The problem
The problem is that I need to create a formula that takes counterbalancing into account.
So in cell A3 of the second image I would to record the number of times the value 1 and 3 appears in column I of the first image.
The conditions
However, I would only like the numbers in column I to count if:
a) in column M of image 1 there is a value of 1
and
b) when the number in Column L is 1 and Column K is 1 or 4 OR when the number in Column L is 2 and the number in Column K is 3 or 4.
My attempt
=SUM('[All_memories_301-389_improved.xlsx]Sirma 301:387Yanxin'!$M$2,1*(IF('[All_memories_301-389_improved.xlsx]Sirma 301:387Yanxin'!$L$2,1*(IF('[All_memories_301-389_improved.xlsx]Sirma 301:387Yanxin'!$K$2:$K$41,1,4*(IF('[All_memories_301-389_improved.xlsx]Sirma 301:387Yanxin'!$I$2:$I$54,1,3)))))))
This did not work however and I have spent a long time on this and made changes but I still can't seem to get it to work.
Extra information:
In column I I want to count all the occurrences of 1 and 3 provided the specified conditions are met. The rows are not important, but rather, the column I information for each of the 90 spreadsheets.
New attempt with formula:
=COUNTIFS('[All_memories_301-389_improved.xlsx]381Christie'!$M$2, 1, '[All_memories_301-389_improved.xlsx]381Christie'!$L$2, 1, '[All_memories_301-389_improved.xlsx]381Christie'!$K$2:$K$23, AND(1,4), '[All_memories_301-389_improved.xlsx]381Christie'!$I$2:$I$23, AND(1,3))

Vllookup, match, index

I am trying to compare data from one sheet to another. Address and its ID.
Both sheets have Address and ID. ID can be repetitive.
Sheet 1 Sheet 2
Address ID Address ID
23 1 22 1
45 1 45 1
23 2 23 2
45 2 45 3
I want to check whether the data address & ID on sheet 1 appear on Sheet 2 thus making a new row with return Yes or No on sheet 1 for every column.
This can be done very quickly with an array formula.
Picture of ranges and result shows the data on the same sheet so that it is easier to see what is going on. Pretend Sheet1 is on the left and Sheet2 is on the right.
Formula in cell D3 is an array formula (enter with CTRL+SHIFT+ENTER) and then copied down to fill.
=(B3=$F$3:$F$6)*(C3=$G$3:$G$6)
This formula will simple return a 0 or 1 for no match/match. You can wrap it in an IF if you want text instead. It is simply checking that the relevant values match for both columns in both "sheets".

Excel formula to get last entry in a row

I have a sheet where each row begins with a string identifier, followed by a series of values for each week since the sheet was created:
XXX 15 20 25
YYY 11 15 19
ZZZ 18 22 22
On another sheet I would like to have some of the string identifiers from the first page (not all), and only the latest value for that item:
XXX 25
ZZZ 22
I actually want multiple sheets of the second kind, with each string id possible appearing on more than one sheet.
I can't use VBA as this has to be viewed (and values added and altered) on my Windows Phone 7 (I do not believe the mobile version of excel supports VBA, but correct me if I'm wrong). Is there a formula that's able to do this?
The value of the last non-blank cell in ROW range
=LOOKUP(2,1/(A1:M1<>""),A1:M1)
on your master sheet you should designate a hidden column like ZZ to contain the formula: =LOOKUP(2,1/(A1:ZY1<>""),A1:ZY1) this will put in column ZZ all the LAST values of that specific row
on all of the other sheets that depend on your master, you can use a vlookup to retrieve the information in ZZ from the master sheet

Excel lookup vector based on another formula

My spreadsheet has 2 sheets.
Sheet 1 contains 30 days worth of values.
Each day's values are a maximum of 19 rows, consisting of names and correspoding values. The names that will appear for each day are not the same every day. In other words my name might appear on the 1st, 2nd and 14th of the month and not on any other days. (And these values may not be sorted.)
My second sheet will display only one persons values for the month, and I therefore use a lookup.
The formula for the 1st day is:
=LOOKUP("name";'Input Sheet'!$A$2:$A$20; 'Input Sheet'!B2:B20)
For the second day it would be:
=LOOKUP("name";'Input Sheet'!$A$22:$A$40; 'Input Sheet'!B22:B40)
The only thing that changes for each day is the lookup range/vector. I have a separate (hidden) column already that has calculated the correct starting row number, i.e. 22, 42, 62, but how would I use that number to change the lookup range on my formula?
Thanks a lot
Michael
The indirect() function will allow you to specify the range for your lookup in terms of another cell.
For example, if Sheet1 of the workbook has the numbers 1-10 going from A3:A12, where the starting row (3) is specified in cell B1 of the same worksheet.
3
1
2
3
4
5
6
7
8
9
10
Then to lookup the value 5 and place the answer on any other sheet of the workbook:
=LOOKUP(5,INDIRECT("Sheet1!$A"&Sheet1!$B$1&":$A$12"))

Resources