Expired expiration date with text in the same cell

2phat4u

New Member
Joined
Aug 20, 2013
Messages
45
Hello,

I am looking for a formula that it would let me know when the expiration date going to be expired or has expired with the text in the same cell.
For example, Cell A1 contains "ISO 13485:2003 (exp. 2/2/2012)". How do I write the formula to let me know when the date has expired but the cell must include "ISO 13485:2003 (exp. 2/2/2012)"?

Is that even possible?



Help, please.
 
Yes, each time the date expired, I have to change it in the same cell. Which is why it is still red when i changed the year. So, what you're saying by changing the year on that date it will still be red.


let us go back to basics - say cell A1 can only have 3 values, 1,2 or 3
first cond format formulaa will be =A1=1 and set to red
put 1 in A1 and A1 goes red
now without YET adding another formula, make A1=2
A1 loses its red color, it cannot be red because it does not equal 1

did you change the cell in my example to ISO 13485:2003 (exp. 2/2/2020)
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
it only goes red if the expiry date has passed - so check if you have entered the formula correctly - try out in a new dpreadsheet when A1 =1 it goes red any other value no color will be applied
 
Upvote 0
Guess that formula is too complicated. Let make this simple as possible. Cell A1 contains ISO 13485:2003 (2/2/2012). This time is w/o the exp. Can you show me the formula where it will turn red when the expiration date expired?


If possible, can you show me the formula for the same cell when it is within 30 days before expiring?




it only goes red if the expiry date has passed - so check if you have entered the formula correctly - try out in a new dpreadsheet when A1 =1 it goes red any other value no color will be applied
 
Upvote 0
no because it might be 02/02/2012 or 02/02/12

if you can format all dates as dd/mm/yyyy then it is much simpler
 
Upvote 0
I tried pluggin in the formula for A1. It turns red for the year 2012.

Under Cond. Formatting, I used "Use a formula to determine which cells to format" in Rule Type. That is where I plugged in your formula.

Here is what I have for A1 cell ISO 13485:2003 (exp. 02/02/2012 just like you had. When I changed just the year to 2022, it's still red. The red was supposed to go away when the year is changed.


I don't know what I'm doing wrong. Please help.



no because it might be 02/02/2012 or 02/02/12

if you can format all dates as dd/mm/yyyy then it is much simpler
 
Upvote 0
you have a newer version of excel than me. if it went red the formula "worked". I have no idea why the red did not disappear when you changed it to 2022.

Are you able to influence how the data comes into you ? Copy the date as is with 2022 and paste it here and I will try to work with it
 
Upvote 0
I am using a 2010 version of excel. The data is simple I just type ISO 13485:2003 (exp. 02/02/2022) into A1 cell.



you have a newer version of excel than me. if it went red the formula "worked". I have no idea why the red did not disappear when you changed it to 2022.

Are you able to influence how the data comes into you ? Copy the date as is with 2022 and paste it here and I will try to work with it
 
Upvote 0
ISO 13485:2003 (exp. 02/02/2012)02/02/2012)1002/02/2012
C1
=MID(A1,SEARCH("exp.",A1)+5,99)
D1
=LEN(C1)-1
E1
=LEFT(C1,D1)
do this with your set up and change to 2022 - does the date in cell E1 change correctly ?

<colgroup><col><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
Went back and reread what you wrote. You wrote my reply showed you how to pull the date out
so you need =if(today() - put formula to strip out date here - >0, "exp", "not exp").


So, I substitute the formula stripping out the date into =if(today() - put formula to strip out date here - >0, "exp", "not exp").


Which the final formula will be =if(today(=VALUE(IF(ISERROR((SEARCH("exp.",LEFT(A1,LEN(A1)-1))))," no",MID(LEFT(A1,LEN(A1)-1), SEARCH("exp.",A1)+5,99))))>0, "exp", "not exp"). Can you check it?




<tbody>
</tbody>
you have a newer version of excel than me. if it went red the formula "worked". I have no idea why the red did not disappear when you changed it to 2022.

Are you able to influence how the data comes into you ? Copy the date as is with 2022 and paste it here and I will try to work with it
 
Upvote 0
I don't want the date to be in a different cell. It must be in the same cell.


ISO 13485:2003 (exp. 02/02/2012)02/02/2012)1002/02/2012
C1
=MID(A1,SEARCH("exp.",A1)+5,99)
D1
=LEN(C1)-1
E1
=LEFT(C1,D1)
do this with your set up and change to 2022 - does the date in cell E1 change correctly ?

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,409
Messages
6,124,737
Members
449,185
Latest member
hopkinsr

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