Index Match or Find Function Help

kylenusser

New Member
Joined
Aug 3, 2018
Messages
9
Hello. I am trying to compile a database and use some function to match the number of calls ran by date.

For example:

[TABLE="width: 500"]
<tbody>[TR]
[TD]1/1/18[/TD]
[TD][/TD]
[TD]1/2/18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Facility A[/TD]
[TD]15[/TD]
[TD]Facility A[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]Facility B[/TD]
[TD]20
[/TD]
[TD]Facility B[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]Facility C[/TD]
[TD]30[/TD]
[TD]Facility C[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]Facility D[/TD]
[TD]20[/TD]
[TD]Facility D[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]Facility E[/TD]
[TD]8[/TD]
[TD]Facility E[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Facility F[/TD]
[TD]9[/TD]
[TD]Facility F[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]Facility G[/TD]
[TD]5[/TD]
[TD]Facility G[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Facility H[/TD]
[TD]8[/TD]
[TD]Facility H[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]Facility I[/TD]
[TD]10[/TD]
[TD]Facility I[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]


Above is a database of the first two days. I am trying to compile a sheet that has Facility A-F in column A and in Column B-Etc is each date from 1/1/18-12/31-18. I am trying to see if there is a function that will allow me to search the table above for say Facility A on 1/1/18. I want to set it to be able to pull any day, as the table will ultimately extend to 12/31/18.

Does anyone know of any functions that can do this?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
=HLOOKUP(date,B1:NC2,2)

"date" is a serial number. It is 43110 for 10/1/18.
 
Upvote 0
Maybe I wasnt clear enough. That does return a value.

On Sheet 1, I have as follows:

Column A Column B Column C
1/1/18 1/2/18
Facility A ?
Facility B ?
Facility C etc ?

On Sheet 2 I have every Facility in the database.

Column A Column B Column C Column D
1/1/18 Trips 1/2/18 Trips

Facility A 5 Facility A 10
....... ......
....... ......
Facility Z 15 Facility Z 18


As you can see Column A and C are the facilities and B and D are trips and this continues for each subsequent date.

Index(B:B,Match(A2,A:A,0)) auto filled to the next column would be Index(C:C,Match(A2,B:B,0)) which wouldnt match anything. I need Column B to read Index(D:D,Match(A2,C:C,0)) and skip two columns for every autofill
 
Upvote 0
You said you want to create a worksheet "that has Facility A-F in column A and in Column B-Etc is each date from 1/1/18-12/31-18". I don't understand why you need to repeat facilities every other column, like what you have now.
 
Last edited:
Upvote 0
Try this


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td][/td][td]
01/01/2018​
[/td][td]
01/02/2018​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
Facility A​
[/td][td]
5​
[/td][td]
4​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
Facility B​
[/td][td]
1​
[/td][td]
1​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
Facility C​
[/td][td]
4​
[/td][td]
1​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
Facility D​
[/td][td]
1​
[/td][td]
1​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
Facility E​
[/td][td]
6​
[/td][td]
7​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td]
Facility F​
[/td][td]
21​
[/td][td]
1​
[/td][/tr]
[/table]


Formula in B2 copied across and down
=INDEX(INDEX(Sheet2!$A:$ZZ,0,MATCH(B$1,Sheet2!$1:$1,0)+1),MATCH($A2,Sheet2!$A:$A,0))

Hope this helps.

M.
 
Upvote 0
Try this


[TABLE="class: grid"]
<tbody>[TR]
[TD="bgcolor: #DCE6F1"][/TD]
[TD="bgcolor: #DCE6F1"]
A
[/TD]
[TD="bgcolor: #DCE6F1"]
B
[/TD]
[TD="bgcolor: #DCE6F1"]
C
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
1
[/TD]
[TD][/TD]
[TD]
01/01/2018​
[/TD]
[TD]
01/02/2018​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
2
[/TD]
[TD]
Facility A​
[/TD]
[TD]
5​
[/TD]
[TD]
4​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
3
[/TD]
[TD]
Facility B​
[/TD]
[TD]
1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
4
[/TD]
[TD]
Facility C​
[/TD]
[TD]
4​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
5
[/TD]
[TD]
Facility D​
[/TD]
[TD]
1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
6
[/TD]
[TD]
Facility E​
[/TD]
[TD]
6​
[/TD]
[TD]
7​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
7
[/TD]
[TD]
Facility F​
[/TD]
[TD]
21​
[/TD]
[TD]
1​
[/TD]
[/TR]
</tbody>[/TABLE]


Formula in B2 copied across and down
=INDEX(INDEX(Sheet2!$A:$ZZ,0,MATCH(B$1,Sheet2!$1:$1,0)+1),MATCH($A2,Sheet2!$A:$A,0))

Hope this helps.

M.


Youre a legend Thank you
 
Upvote 0
Disregard the above formula. Try this simpler formula

B2 copied across and down
=INDEX(Sheet2!$A:$ZZ,MATCH($A2,Sheet2!$A:$A,0),MATCH(B$1,Sheet2!$1:$1,0)+1)

M.
 
Upvote 0
Quick Question. Say in Column C on Sheet 2 there is a Facility G, which isnt in Column A. How can that formula apply to that?

Disregard the above formula. Try this simpler formula

B2 copied across and down
=INDEX(Sheet2!$A:$ZZ,MATCH($A2,Sheet2!$A:$A,0),MATCH(B$1,Sheet2!$1:$1,0)+1)

M.
 
Upvote 0
Quick Question. Say in Column C on Sheet 2 there is a Facility G, which isnt in Column A. How can that formula apply to that?

Not sure i understand what you are looking for.

See if this works
B2 copied across and down
=IFERROR(INDEX(INDEX(Sheet2!$A:$ZZ,0,MATCH(B$1,Sheet2!$1:$1,0)+1),MATCH($A2,INDEX(Sheet2!$A:$ZZ,0,MATCH(B$1,Sheet2!$1:$1,0)),0)),"")

M.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top