Can you combine an action into a formula?

mfrank

New Member
Joined
Feb 2, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
What I am trying to do is the following formula:

=IF(OR(A6=A5,A6),(E6+E5)&(Ctrl+U),E6)

It would be swell if I can incorporate the underline function/action into the formula. Help!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Welcome to the forum!

A formula just returns a value, it does not allow formatting. However you can use Conditional Formatting to do what you want. I think your formula is a bit off though. That will return the TRUE result if A6 is any non-zero number, as well as if A6=A5.
 
Upvote 0
Welcome to the forum!

A formula just returns a value, it does not allow formatting. However you can use Conditional Formatting to do what you want. I think your formula is a bit off though. That will return the TRUE result if A6 is any non-zero number, as well as if A6=A5.
Well, that is a bummer! It ought to be that easy! The rest of the formula is correct though! Thanks for the help!
 
Upvote 0
Conditional Formatting is easy! Let's assume your formula is in the B6 cell. Just select B6,from the Home tab, click Conditional Formatting > New Rule > Use a formula > then enter

=OR(A6=A5,A6)

Then click Format... then pick the Font tab, then select Single from the Underline box. If you plan on copying your formula to other cells, we might need to adjust the CF formula to have absolute references ($ signs).
 
Upvote 0
Solution

Forum statistics

Threads
1,215,537
Messages
6,125,390
Members
449,222
Latest member
taner zz

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