Display date above the left-most cell that contains a certain letter/number combination?

ntech

New Member
Joined
Oct 7, 2017
Messages
21
41v8uoA.jpg


This is an example of a formula I would like to house in the AC4 cell that will display the date above the left-most cell that contains:

Any number from 0-999

Any number/”C” combination such as:

0-9C
10-99C
100-999C


I would like the formula to exclude the “CO” code and any other character only combinations.
 
Control+shift+enter:

=IFERROR(INDEX($G$2:$R$2,MATCH(TRUE,ISNUMBER(SUBSTITUTE(UPPER(G4:R4),"C","")+0),0)),"does not exist")
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
=IFERROR(INDEX($G$2:$R$2,MATCH(TRUE,ISNUMBER(SUBSTITUTE(UPPER(G4:R4),"C","")+0),0)),"does not exist")

Is there a way to modify the above formula so it will still calculate the left-most date when the following data is entered:

100/100C (both lowercase and uppercase "c")

100C/200C (both lowercase and uppercase "c")

100C/200C (both lowercase and uppercase "c")


The current formula will not function properly with the above combinations in the cells.


Thank you, that works great!
 
Last edited:
Upvote 0
Control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($G$2:$R$2,MATCH(TRUE,ISNUMBER(SUBSTITUTE(IF(ISNUMBER(SEARCH("/",G4:R4)),REPLACE(G4:R4,1,SEARCH("/",G4:R4),""),IF(G4:R4="","",G4:R4)),"C","")+0),0)),"does not exist")
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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