Select rows from sheet1 & display in sheet2 - excel

In Row1 on sheet1 I insert ID, Description, Amount
ID will have values such as:
01
02
03
01
02
04
01
On a separate sheet I would like to show only the rows which have ID 01.
I would like this automatic, without using filter, or VBA
Is there any particular equation?

I believe dLookup should do the trick

Related

How to add cells consecutively after an interval of three cells

I have 18 years of monthly data i.e., I have 18*12 = 216 cells arranged in a row. I have to add JJAS (June 01 July 01 August 01 September 01) and then ONDJF (Oct 01 Nov 01 Dec 01 Jan 02 Feb 02) values. I want to skip MAM. I have to repeat this procedure for all 18 years.
I can do this manually but want to automate it.
I want JJAS 01 ONDJF 01-02 JJAS 02 ONDJF 02-03...
If Column B contains dates and Column C contains text then putting this formula in Column A will result in Column A having text for JJASONDJF and empty cells MAM.
=IF(OR(MONTH(B1)<3,MONTH(B1)>5),C1,"")
If dates are in Row 2 then putting this formula in Row 1 will display the date.
=IF(OR(MONTH(A2)<3,MONTH(A2)>5),A2,"")

What is the best way to use Index Match in this case?

In the primary worksheet, I have a list of employees in column A, from columns D:ZZ I have basically a calendar in row 11. Where these intersect, I have assigned a task code to each employee to illustrate what they are employed to do that day. I want to dynamically color the coded cell based on the date in the row 11 and code from the column that it was entered. In my second sheet, I have a table of the codes along column A. From columns B:AM, in row 2 (under the header) I have another code that says what type of work it is, in office, on the road, etc. This is the code I am trying to look up with Index Match. In the row with the task code, under each header I have a scheduled date that that particular job will be either in or out or nothing.
I can Index the task column pretty easily, my problem is how would I take the row I get from that, then search only that row for the date that I applied the code to the employee to return the result from row 2 and the column that that date appears?
I have a pretty good understanding of Index/Match in looking up multiple items to return a result. I am having a problem creating a range from a result to find the data I want.
I have tried Indirect and Address as well as Offset, but I don't want this to be volatile as it is being used in conditional formatting over several thousand cells.
Task Code Schedule Worksheet
DAY 1 2 3 4 ...
CODE A S A F ...
96T003 03 May 04 May 05 May 06 May ...
96T004 05 May 06 May 07 Jun 10 Jun ...
96T005 05 May 19 Jul 22 Jul 23 Jul ...
Primary worksheet
SAT SUN MON TUE WED
DATE 01 02 03 04 05
JONES OFF OFF 96T003 96T003 96T004
DAVIS OFF OFF 96T003 96T003 96T005
This formula works, but is "volatile" and I am leary to use it in a conditional formatting function. Is there a way to make it not as volatile?
=INDEX(CMP_FLYCODE,1,MATCH(F11,INDIRECT("'CMP'!"&ADDRESS(MATCH(F19,CMP_ADP,0),1)&":"&ADDRESS(MATCH(F19,CMP_ADP,0),40)),0))
CMP_FLYCODE is a reference to just the A, S and F code row
Expecting to return a letter code A, S or F based on the date and code
Edit: Added the header to the code schedule that is a unique number for the day of the task 1, 2, 3...
I don't think it's too bad, you can just get the entire row from the 2d array B3:E5 in the task sheet using index with the match for the task code in the row parameter and 0 in the column parameter, then match the date in that and use index again to get the required letter code.
This is what my formula looks like:
=IF(C3="OFF","",INDEX(Tasks!$B$2:$E$2,MATCH(C$2,INDEX(Tasks!$B$3:$E$5,MATCH(C3,Tasks!$A$3:$A$5,0),0),0)))
This is my primary sheet:
This is my task sheet:
So to use this in conditional formatting, you would need three rules using custom formulas
=INDEX(Tasks!$B$2:$E$2,MATCH(C$2,INDEX(Tasks!$B$3:$E$5,MATCH(C3,Tasks!$A$3:$A$5,0),0),0))="A"
=INDEX(Tasks!$B$2:$E$2,MATCH(C$2,INDEX(Tasks!$B$3:$E$5,MATCH(C3,Tasks!$A$3:$A$5,0),0),0))="S"
=INDEX(Tasks!$B$2:$E$2,MATCH(C$2,INDEX(Tasks!$B$3:$E$5,MATCH(C3,Tasks!$A$3:$A$5,0),0),0))="F"
with appropriate fill colours.

Replace a number with text from a table

I have to pull account reports out of a system but the regions are represented as a number. I have a separate list that has two columns, one with the region name and one with the corresponding number. I'm looking to write a formula that identifies the number in the report column and populates it with the region name from my static table.
Example:
Region List
A1 B1
1 00 London
2 01 West Midlands
3 02 Greater Manchester
Report
A2 B2
1 Customer A 00
2 Customer B 02
3 Customer C 02
4 Customer D 01
5 Customer E 00
As mentioned, I want to populate column B2 with the data from B1. B2's numbers will corrispond with A1's numbers. It's worth mentioning that there are also some variations like 07D or 19H, so the formula would need to take that into account.
Use this function, I hope it will work.
=INDEX('Region List'!$B$1:$B$3;MATCH($B1;'Region List'!$A$1:$A$3;0))

Cannot reference to another spreadsheet using SUMPRODUCT

I am trying to get the last value of every S/N. Which means to say if I reference to '1a', I should get '23'.
I tried using =INDEX(B1:B9,SUMPRODUCT(MAX((A2:A9=E7)*ROW(A2:A9)))) for the following, which works for the same spreadsheet, however I cannot reference S/N and Value in other spreadsheets. I get a #REF!.
S/N Value
1a 41
2a 41
3a 23
4a 342
1a 31
1a 23
3a 43
2a 54
Is there another formula to reference to other spreadsheet?
You need to reference the other spreadsheet like:
EDIT: When other workbook is closed, this needs to be entered with the full path.
'C:\Property Audits\Western Region\Apartments\[Other Workbook.xlsx]Name of Sheet in Other Workbook'!B1:B9
Do this wherever there is a range of cells that you are referencing in the other workbook.

Excel and VLOOKUP

I am working a project where I need to find certain words and replace them with a number in another column. However I cant find a way to make it work for the large amount of information
For Example: A Is the column where i am taking the old information. B is where I need to take the old information and replace it while the numerically code given in column C
A B C
Single 01 Single = 01
Single 01 Married = 02
Single 01 Unknown = 98
Married 02 Divorced = 99
unknown 98 Separated = 05
Divorced 99
Separated 98
I'm not sure how to get it to work . So any help would be greatly appreciated.
Rob, you look up range has to be a two-column layout, not a one-column as you have it.
Assuming your data starts at row 1, your current lookup range is C1:C5. I would do the following:
1) Assign cell C1 to value of "Single", C2 = "Married", C3 = "Unknown", C4 = "Divorced", C5 = "Separated".
2) D1 should be "01", D2 = "02", D3 = "98", D4 = "99", D5 = "05"
3) B1 = =VLOOKUP($A1,$C$1:$D$5,2,)
4) Copy this formula down so B7 =VLOOKUP($A7,$C$1:$D$5,2,)
5) If you like to handle any errors and assign unknown values to "98", you can change cell B1 to have this formula instead: =IFERROR(VLOOKUP($A1,$C$1:$D$5,2,),"98")

Resources