Find the next string of the same value, return cell in that row, different column

Wad Mabbit

Board Regular
Joined
Mar 31, 2016
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
HI,

I have phone numbers in column H, they are NOT unique
I have start times in column C

In column J I wouod like the next start time of the matching number

So say, In H10 and H12 I have the same number+61411222333
In C10 and C12 are start times

In J10 I want the start time of C12

C12 in this instance being the next row from 10 that has a matching number

What I want to have is a lookup of the next appointment time for a matching number. There isn't a contiguous date field I can use so I need some magic!

Can you help?

I then hope to find a safe, reliable SMS service to set up an appointment reminder formula.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You are a genius!
Now, for an embellishment?

In column A, I have dates. But not sequential.

E.g. A5, A14, A29, A26
In H10 and H12 I have number matches. The formula you gave works beautifully..

J10 has..
=IFNA(INDEX(C11:C$1310,MATCH(H10,H11:H$1310,0)),"")

Can I snag the date for line 10 (which isn't actually in line 10 as its not my sheet). So A6 to A13 are blank, the nearest backwards match is A5 (23 Aug 22).

Yeah, it's messy, but the sheet is set in a 'minimalist' fashion (with the least effort to actually putting useful info in haha).

With a day's date in A, followed by some bookings that day.

Then the next day in A, bookings for THAT day, and so forth.

🙏
 
Upvote 0
Now, for an embellishment?

In column A, I have dates. But not sequential.

E.g. A5, A14, A29, A26
In H10 and H12 I have number matches. The formula you gave works beautifully..

J10 has..
=IFNA(INDEX(C11:C$1310,MATCH(H10,H11:H$1310,0)),"")

Can I snag the date for line 10 (which isn't actually in line 10 as its not my sheet). So A6 to A13 are blank, the nearest backwards match is A5 (23 Aug 22).

Yeah, it's messy, but the sheet is set in a 'minimalist' fashion (with the least effort to actually putting useful info in haha).

With a day's date in A, followed by some bookings that day.

Then the next day in A, bookings for THAT day, and so forth.

🙏
Oh, hehe, I forgot to ask, back to the original question, how to ignore blank matches in H?

I.e. There is a match of two blank cells (row may be used to put in a space, a break, a comment etc.) 😀
 
Upvote 0
Plan C?
I just realised I could use a hidden helper column to echo the prior date in each row...

Would that help, or be unnecessary?
 
Upvote 0
:unsure: Hard to follow in a number of disjointed posts.
What about a small but representative set of dummy sample data and the expected results with XL2BB and explain again in relation to that sample data?
 
Upvote 0
Sorry, can't use XL2BB
Attached is a pic..
J305: =if(H305="" , "",IFNA(INDEX(C306:C$1450,MATCH(H305,H306:H$1450,0)),""))

H314: =IFERROR(IF(isnumber(search("61",$G314)),"+"&MID(SUBSTITUTE($G314," ",""),SEARCH("61",SUBSTITUTE($G314," ","")),11) ,IFERROR("+61"&MID($G314,SEARCH("04",$G314)+1,10),MID(SUBSTITUTE($G314," ",""),SEARCH("04",SUBSTITUTE($G314," ","")),11))),"")
 

Attachments

  • Runsheet.jpg
    Runsheet.jpg
    146.7 KB · Views: 1
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,462
Members
448,965
Latest member
grijken

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