Inserting text in a cell

Annmad

New Member
Joined
Apr 4, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi,
I want a text to appear in a cell based on the value in the cell before . This is my formula:

=IF(($AR6=1),"General Communication Periodic Monitoring",IF(AND($AR6>1,$AR6<=2),"General Communication Periodic Monitoring Safety Procedure Training",IF(AND($AR6>2,$AR6<=3),"Specific Hazard Communication Work Practice Control Periodic Monitoring",IF(AND($AR6>3,$AR6<=4)," Medical Surveillance Work Practice Control Exposure Control Plan Periodic Monitoring",IF(AND($AR6>4,$AR6<=5),"Engineering Control Respirator Medical Surveillance Work Practice Control Exposure Control Plan Periodic Monitoring ")))))

I don't know what is the mistake. The text doesn't appear. Can you help me, please?
 
Hi Joe4,that
I formatted column AR6 as a number and redone the formula, but I still have the answer False instead of the text corresponding to the value in cell AR6.
Thank you,
This is what my columns look like
 

Attachments

  • excel.png
    excel.png
    15.9 KB · Views: 7
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi Joe4,that
I formatted column AR6 as a number and redone the formula, but I still have the answer False instead of the text corresponding to the value in cell AR6.
Thank you,
Have you tried the formula "Cubist" posted?

And as I mentioned, changing the format of the cell AFTER the data already exists there will NOT change the data type, unless you then re-enter the number!

Easy way to check to see if it is entered as a number or text.
Enter this formula in any blank cell:
Excel Formula:
=ISNUMBER(AR6)
If it returns TRUE, AR6 is a valid number.
If it returns FALSE, AR6 is Text.
 
Upvote 0
So format and re-enter the values as I've said 2x already? Or did that not work either?
 
Upvote 0
So format and re-enter the values as I've said 2x already? Or did that not work either?
I have reformatted the column and re-entered the values, and True appears in column AS6 instead of the text referring to the value.
 
Upvote 0
OK, if true appears, then they are valid numbers, and you do NOT want the text-qualifiers (double quotes) in your formulas.

Have you tried Cubist's simplified formula too?
 
Upvote 0
OK, if true appears, then they are valid numbers, and you do NOT want the text-qualifiers (double quotes) in your formulas.

Have you tried Cubist's simplified formula too?
I want to see the text corresponding to the value in AR6 in AS7. I am not sure if cubist will work.
 
Upvote 0
I want to see the text corresponding to the value in AR6 in AS7. I am not sure if cubist will work.
Adjust the cell reference to AR6. I had AR16 in the prior post.
 
Upvote 0
I want to see the text corresponding to the value in AR6 in AS7. I am not sure if cubist will work.
Result with Cubist's formula, after changing the "AR16" reference to "AR6"):

1712249404464.png
 
Upvote 0
If that doesn't work, would we not be able to find the problem if xl2bb was used to post a copy of the range?
 
Upvote 0
Consider using CHOOSE() to eliminate the nested IF.
Excel Formula:
=CHOOSE($AR16,"General Communication Periodic Monitoring",
"General Communication Periodic Monitoring Safety Procedure Training",
"Specific Hazard Communication Work Practice Control Periodic Monitoring",
"Medical Surveillance Work Practice Control Exposure Control Plan Periodic Monitoring",
"Engineering Control Respirator Medical Surveillance Work Practice Control Exposure Control Plan Periodic Monitoring")
Thank you, I have tried the function choose, and it works perfectly.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
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