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:

1/1/181/2/18
Facility A15Facility A25
Facility B20
Facility B15
Facility C30Facility C15
Facility D20Facility D10
Facility E8Facility E7
Facility F9Facility F10
Facility G5Facility G6
Facility H8Facility H9
Facility I10Facility I20

<tbody>
</tbody>


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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
=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


A
B
C
1
01/01/2018​
01/02/2018​
2
Facility A​
5​
4​
3
Facility B​
1​
1​
4
Facility C​
4​
1​
5
Facility D​
1​
1​
6
Facility E​
6​
7​
7
Facility F​
21​
1​

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


A
B
C
1
01/01/2018​
01/02/2018​
2
Facility A​
5​
4​
3
Facility B​
1​
1​
4
Facility C​
4​
1​
5
Facility D​
1​
1​
6
Facility E​
6​
7​
7
Facility F​
21​
1​

<tbody>
</tbody>


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,215,446
Messages
6,124,904
Members
449,194
Latest member
JayEggleton

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