Find in which column(s) a value appear

merlix3

New Member
Joined
Aug 19, 2015
Messages
1
So I have this table that looks like this in a sheet called Raw Data:

ABCDE...SF
1Date 1Date 2Date 3Date 4Date 5Date ...Date 500
2OtherOtherOtherOtherOtherOtherOther
3125487245875325665125452547854325658399856
4302154125475245478326585214523623524222256
5prog362548332145214521225325325654354789
...autre125624235652526352299990
500235478236547

<tbody>
</tbody>

So as you can see the table goes (or will eventually go) from A1 to SF500 (a matrix named All in my spreadsheet). These represent caller IDs (the "prog" and "autre" represent some kind of errors but we don't really care about them). I would Like a tool that would allow me to find at what dates a specific caller ID called.

So it would look like this (or something similar) in an other sheet called Stats Data

MN
45Target Caller IdOldest Date
46Date
47Date
48Date
49Date
50Newer Date
......

<tbody>
</tbody>

So here basically one would enter in M40 the Target Id and in N40 and below would appear the dates at which that ID called. I though we could do this by finding the target and returning to the value in the first row of the same column but it's the multiple value that causes problem. Not all ID will be there multiple times but some will (the most frequent one is there 16 times so up to 25 iterations should be correct).

I tried before coming here to lookup a value (that I knew to be unique, one step at the time) and using the column reference as a reference for an index value as a matrix function but it failed... Here is what I tried, written in cell N45:

{=INDEX(All;MAX(SI(A3:SF500=M45;COLONNE(A3:SF500)-COLONNE(A1)+1)))}

Thanks in advance for the help, It will truly help
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi.
1. Insert a row above row 1 in your raw data.
2. Put a formula: =if(COUNTIF(A3:A500, 'Stats Data'!$M$45)>0,column(),"") , and drag it from A1 to SF1
3. On the Stats Data sheet use the small() function combined with hlookup() to find the date value of each column that the phone number appeared in (each column that it appears in will have a number at the top of the column)

Check out my youtube channel please :) --> Excel 101
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,943
Members
449,275
Latest member
jacob_mcbride

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