Conditional Formatting to format a number with a preceding letter

doverfelt

New Member
Joined
Oct 27, 2016
Messages
10
I have an issues & actions log i'm setting up. In the log, I have Column A prefilled ID # field; 1, 2...50 to start. Then Column B is a dropdown with values of Action or Issue.

Based on the value in column B (Action or Issue), I would like add either an A- or an I- in front of the number automatically. So... it would look like this...

Column A Column B
A-1 Action
I-2 Issue
I-3 Issue
A-4 Action

Is this remotely possible? I thought it'd be tied to custom Text string, but i'm not seeing the link between the formula to result in using a specific custom text.

Thanks for any ideas.

Darren
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
If you want to change the value of col A you'll need VBA, but if you just want to display A-1 & leave the cell contents as 1, you can use CF
Select the range in col A you want this to work on > Home Tab . Conditional formatting > New rule > Use a formula > enter =B2="Action" > Format > Number > Custom > "A-"# > Ok
and repeat but for Issue
 
Upvote 0
Thank you, Fluff! This makes perfect sense. But, i did this and the formatting of col A is not taking. Not sure why at this point... may have to do some reading, I guess...
 
Last edited:
Upvote 0
The "Action" is just the value in Col B.
Also should have said to change B2 to match the first cell in col A in the applies to range. So if you select A5:A100 the formula should be =B5="Action"
 
Upvote 0
Gotcha, Fluff. thanks. The text in the field is just not working. I added a fill color to each rule, red fill for Issue and green fill for Action. This let me make sure the formula itself was working. So, selecting Issue or Action in Column B changes Column A to the assigned fill color. The thing not working is the cell formatting the A- or the I- in front of the number... still plugging away on it, trying various custom number formats
 
Upvote 0
The custom format of "A-"# works for me, are the values in col A numbers?
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,849
Members
449,051
Latest member
excelquestion515

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