krunal123

Board Regular
Joined
Jun 26, 2020
Messages
177
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
image_2021-01-29_121905.png


# How to Find particular text in Date ??????

i try to find "2021" in this cell , If Condition is " OK" and if then may be change text like "2020" this condition show "Mistake"
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi,

To find year in the cell, use below:
If Cell format is text then use:
Excel Formula:
=IF(RIGHT(A3,4)="2021","Ok","Mistake")

If Cell format is Date then use:
Excel Formula:
=IF(YEAR(A3)=2021,"Ok","Mistake")
 
Upvote 0
Hi,

To find year in the cell, use below:
If Cell format is text then use:
Excel Formula:
=IF(RIGHT(A3,4)="2021","Ok","Mistake")

If Cell format is Date then use:
Excel Formula:
=IF(YEAR(A3)=2021,"Ok","Mistake")

_______________________________________________
THANKS A LOT ..............................
 
Upvote 0

Forum statistics

Threads
1,223,867
Messages
6,175,077
Members
452,611
Latest member
bls2024

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