Selecting a cell based on format

PatrickW

New Member
Joined
Oct 23, 2008
Messages
41
Hi all

We know that conditional formatting takes the value of a cell, and thereby determines its format.

I'm looking to go the other way, or at least partly. I'm wanting to use the format of a cell in a formula.

As an example, I have a column of data: some of which are bold+italicised, and others of which are normal text, however, the text formatting implies something specific about those particular entries.

I would like to be able to return a value of TRUE or FALSE, depending on whether the cell text is bold (or bold+italics, or italics), or just plain text.

In looking for a solution to this problem I've done some forum searching here and elsewhere, and looked at the built-in help - and I've come across the various arguments of the cell("info type",reference) formula.

In this, I am able to isolate a few properties of the cell (including text alignment, number format and others) but not whether the text is bold/italicised or similar. As a workaround, I've manually right-aligned the text that is bold+italicised, and I can then grab those in a formula: if(cell("prefix",A1)=",something,something_else) - but is there a way to do this without the 'alignment' workaround?

As an additional question, is there a formula argument/formula-based solution that returns cell fill colour? I'd like to try and address this without having to play in VBA, if possible.

Thanks for your assistance

PatrickW

(Excel 2007)
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Well blow me down! There you go!

Regarding your first question, no - there is no conditional formatting in the cells, otherwise I'd've grabbed onto whatever the CF was using - but I've never even heard of the get.cell function.

It'll allow me to return any cell property I can think of!

I wonder why this isn't available as a standard formula now?

Thanks for your prompt, concise and correct answer, Jason. I really appreciate it!

PatrickW
 
Upvote 0
Would be so much easier if it was avaiable as a standard formula, think you should be able to do pretty much anything you need to with it in named range though.

I'm not sure if the copy / paste to another sheet / crash issue mentioned in reply #3 of that thread is applicable to 2007 but would avoid that practice to be safe.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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