Excel - bold specific text...

Dan10

New Member
Joined
Nov 26, 2021
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Is there a simple VBA string that will bold the following three examples through two columns of a spreadsheet? (the letter and the numbers vary but each number does not exceed 999):

A1
A10
A100


TIA
 

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.
Why do you need VBA?
Can't you just use Conditional Formatting to do it?
 
Upvote 0
Why do you need VBA?
Can't you just use Conditional Formatting to do it?
Thank you. Id like a short vba script, but conditional formatting may also resolve it?!
 
Upvote 0
A good rule of thumb is to not use VBA to recreate existing built-in functionality (no sense in "re-creating the wheel"), unless there is a good reason to.

It think it should be a simple Conditional Formatting rule, something like:
Excel Formula:
=OR(A1="A1",A1="A10",A1="A100")
if I understand you correctly (from the little information you shared with us).

If not, please provide more details.
 
Upvote 0
Thank you Joe
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0
You are welcome.
Glad I was able to help!
I've had a look at conditional formatting. It does not work - to be fair, I was not very clear in my post....

...the text for making bold is partial text, one item in a string in a cell and appears randomly through text in cells, probably through two non conjoining columns. A VBA script is needed for this. It needs to seek the 2, 3 or 4 alphanumeric characters all starting with one of four letters (say A, B, C or D) and all have a number between 0 and 1000 following each of the letters.

Any additional help would be welcomed.
 
Upvote 0
An image/example often goes a long way in helping to clearly describe what you are trying to do.
Please show us a sample of your data, depicting different scenarios, and show us which values should be highlighted in your example.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,226,453
Messages
6,191,136
Members
453,642
Latest member
jefals

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