Formula to return text

stever - Nov 18, 2022 at 10:57 AM
TrowaD Posts 2913 Registration date Sunday September 12, 2010 Status Moderator Last seen November 21, 2022 - Nov 21, 2022 at 12:03 PM

I need to have a formula to return text from text.

I will give example;

If column A = 7am then I want column B to say Days

If column A = 3pm then I want column B to say Afternoon

If column A = 11pm then I want column B to say Midnights

I have tried various formulas and cannot get it to work.

Thanks in advance!

2 replies

Mazzaropi Posts 1978 Registration date Monday August 16, 2010 Status Contributor Last seen November 18, 2022 146
Nov 18, 2022 at 03:55 PM

stever, Good afternoon.

If that data 7am, 3pm or 11pm are real time and not typed texts, a simple formula with IF function solves your need.

Do you have periods of hours that these messages should appear?

Hope hear form you soon.


Belo Horizonte, MG - Brasil.
Marcílio Lobão

0
TrowaD Posts 2913 Registration date Sunday September 12, 2010 Status Moderator Last seen November 21, 2022 541
Nov 21, 2022 at 12:03 PM

Hi Stever,

You are looking for a so called nested IF formula:
=IF(A2="7am","Days",IF(A2="3pm","Afternoon",IF(A2="11pm","Midnights","")))

Best regards,
Trowa


0