If cell contains specific text, then return a value

ricapan

New Member
Joined
Jan 11, 2023
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello all,

I need some help.



I have an small excel with 5 rows and I need a formula that inserts a fix date.



The rows are:

Location-task-status-pending-completed



On the status row I have a drop-down menu with 3 options(new,pending,done)



What I exactly need is to convert this formula into a fix date:



=IF(cell="text", value_to_return, "")



So if in “status row” I choose “done option”, in the “completed row” it shows the date this option was chosen.




Where “value to return” is a fix date for the option chose on status and does not change unless you change on the drop-down menu.

I am attaching a screen shoot.



I thanks you in advace for you help.



Best.
 

Attachments

  • Captura 1.PNG
    Captura 1.PNG
    3.8 KB · Views: 12

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Without using a macro you could use. add this code to the E2 and fill down
Excel Formula:
=IF(c2="done", NOW(),"")
 
Upvote 0
Without using a macro you could use. add this code to the E2 and fill down
Excel Formula:
=IF(c2="done", NOW(),"")
Thanks for your help, but I get this and i dont know if i am missing something, see image
1673447505579.png
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: If cell contains specific text, then return a value
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
there is an issue with this code i just noticed that every time you refresh or update any cell the time will change
 
Upvote 0
I must be doing something wrong cause it does not work on mune, also my parethesis comme up always in red and are different to yours.
1673514027861.png
 
Upvote 0

Forum statistics

Threads
1,224,889
Messages
6,181,611
Members
453,057
Latest member
LE102024

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