Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Formula with Cell reference to include formating?

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Formula with Cell reference to include formating?

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Formula with Cell reference to include formating?

Bob,
I got it to work using conditional formatting. Highlight B1, go to
Format, Conditional Formatting. In the drop down box, select "formula is",
then enter =(A1A2) in the formula area. Click on the format button, then
choose the color and font that you want when A1A2 (bold and red). Hit the
"add" button to add another condition, which will be for A2A1, and format
for italics and blue. When both formulas are entered with the desired
formatting, hit OK. You should be good to go.
--
future_vba_expert


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Formula with Cell reference to include formating?

Formulas return values, not formatting.

See help on Conditional Formatting.


Gord Dibben MS Excel MVP

On Thu, 18 Jun 2009 11:59:01 -0700, Bob Arnett
wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Formula with Cell reference to include formating?

Hi,

Excel does not do that. You could write a vba macro to do it but that is
probably overkill.

You could take a snapshoot (picture) and paste it but that is probably not
what you want.
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Formula with Cell reference to include formating?

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Formula with Cell reference to include formating?

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Formula with Cell reference to include formating?

Not sure how to do that. I thought you could only do conditional formatting
under the conditional formatting tab. Where would he put the condition under
the default format for the cell? I don't see any way to do that, at least not
in my Excel 2003.
--
future_vba_expert


"Gary''s Student" wrote:

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Formula with Cell reference to include formating?

Starting with a blank worksheet, select A1 and enter 1.
Then format the cell as bold with a red font color.

Now if we apply conditional formatting value is less than 0 with a green font.

Switching between 1 and -1 will cause the font color to toggle.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

Not sure how to do that. I thought you could only do conditional formatting
under the conditional formatting tab. Where would he put the condition under
the default format for the cell? I don't see any way to do that, at least not
in my Excel 2003.
--
future_vba_expert


"Gary''s Student" wrote:

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Formula with Cell reference to include formating?

I still don't see how that shows you whether a1 or a2 is the higher value, in
cell b1. That was the original problem.

--
future_vba_expert


"Gary''s Student" wrote:

Starting with a blank worksheet, select A1 and enter 1.
Then format the cell as bold with a red font color.

Now if we apply conditional formatting value is less than 0 with a green font.

Switching between 1 and -1 will cause the font color to toggle.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

Not sure how to do that. I thought you could only do conditional formatting
under the conditional formatting tab. Where would he put the condition under
the default format for the cell? I don't see any way to do that, at least not
in my Excel 2003.
--
future_vba_expert


"Gary''s Student" wrote:

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Formula with Cell reference to include formating?

Remember Bob wanted:

If the max is in A1, color me red.
If the max is in A2, color me blue.

We, arbitrarily, assume that the max is in A1 and make the default color red.
We then setup the conditional format in case we were wrong:
=A2=MAX(A1:A2) and color me blue.


This cheesy little trick can be used whenever you have only two mutually
exclusive possibilities.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I still don't see how that shows you whether a1 or a2 is the higher value, in
cell b1. That was the original problem.

--
future_vba_expert


"Gary''s Student" wrote:

Starting with a blank worksheet, select A1 and enter 1.
Then format the cell as bold with a red font color.

Now if we apply conditional formatting value is less than 0 with a green font.

Switching between 1 and -1 will cause the font color to toggle.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

Not sure how to do that. I thought you could only do conditional formatting
under the conditional formatting tab. Where would he put the condition under
the default format for the cell? I don't see any way to do that, at least not
in my Excel 2003.
--
future_vba_expert


"Gary''s Student" wrote:

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Formula with Cell reference to include formating?

I stand corrected! You are right.

I would still do it the other way, though, because you can see the full
picture under conditional formatting, with the two formulas. Otherwise you
have to look in 2 places to see what's happening.

--
future_vba_expert


"Gary''s Student" wrote:

Remember Bob wanted:

If the max is in A1, color me red.
If the max is in A2, color me blue.

We, arbitrarily, assume that the max is in A1 and make the default color red.
We then setup the conditional format in case we were wrong:
=A2=MAX(A1:A2) and color me blue.


This cheesy little trick can be used whenever you have only two mutually
exclusive possibilities.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I still don't see how that shows you whether a1 or a2 is the higher value, in
cell b1. That was the original problem.

--
future_vba_expert


"Gary''s Student" wrote:

Starting with a blank worksheet, select A1 and enter 1.
Then format the cell as bold with a red font color.

Now if we apply conditional formatting value is less than 0 with a green font.

Switching between 1 and -1 will cause the font color to toggle.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

Not sure how to do that. I thought you could only do conditional formatting
under the conditional formatting tab. Where would he put the condition under
the default format for the cell? I don't see any way to do that, at least not
in my Excel 2003.
--
future_vba_expert


"Gary''s Student" wrote:

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Formula with Cell reference to include formating?

Actually, I am using Excel 2003, and it allows 3 conditions.
--
future_vba_expert


"Gary''s Student" wrote:

I agree with you completely!!

Explicitly defining the options is MUCH better. The "cheesy" approach
should only be used if the app. is pre-2007 Excel with the old limitations on
conditional formats.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I stand corrected! You are right.

I would still do it the other way, though, because you can see the full
picture under conditional formatting, with the two formulas. Otherwise you
have to look in 2 places to see what's happening.

--
future_vba_expert


"Gary''s Student" wrote:

Remember Bob wanted:

If the max is in A1, color me red.
If the max is in A2, color me blue.

We, arbitrarily, assume that the max is in A1 and make the default color red.
We then setup the conditional format in case we were wrong:
=A2=MAX(A1:A2) and color me blue.


This cheesy little trick can be used whenever you have only two mutually
exclusive possibilities.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I still don't see how that shows you whether a1 or a2 is the higher value, in
cell b1. That was the original problem.

--
future_vba_expert


"Gary''s Student" wrote:

Starting with a blank worksheet, select A1 and enter 1.
Then format the cell as bold with a red font color.

Now if we apply conditional formatting value is less than 0 with a green font.

Switching between 1 and -1 will cause the font color to toggle.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

Not sure how to do that. I thought you could only do conditional formatting
under the conditional formatting tab. Where would he put the condition under
the default format for the cell? I don't see any way to do that, at least not
in my Excel 2003.
--
future_vba_expert


"Gary''s Student" wrote:

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Formula with Cell reference to include formating?

I agree with you completely!!

Explicitly defining the options is MUCH better. The "cheesy" approach
should only be used if the app. is pre-2007 Excel with the old limitations on
conditional formats.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I stand corrected! You are right.

I would still do it the other way, though, because you can see the full
picture under conditional formatting, with the two formulas. Otherwise you
have to look in 2 places to see what's happening.

--
future_vba_expert


"Gary''s Student" wrote:

Remember Bob wanted:

If the max is in A1, color me red.
If the max is in A2, color me blue.

We, arbitrarily, assume that the max is in A1 and make the default color red.
We then setup the conditional format in case we were wrong:
=A2=MAX(A1:A2) and color me blue.


This cheesy little trick can be used whenever you have only two mutually
exclusive possibilities.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I still don't see how that shows you whether a1 or a2 is the higher value, in
cell b1. That was the original problem.

--
future_vba_expert


"Gary''s Student" wrote:

Starting with a blank worksheet, select A1 and enter 1.
Then format the cell as bold with a red font color.

Now if we apply conditional formatting value is less than 0 with a green font.

Switching between 1 and -1 will cause the font color to toggle.
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

Not sure how to do that. I thought you could only do conditional formatting
under the conditional formatting tab. Where would he put the condition under
the default format for the cell? I don't see any way to do that, at least not
in my Excel 2003.
--
future_vba_expert


"Gary''s Student" wrote:

There are only two cases, perhaps the default format could cover one of them?
--
Gary''s Student - gsnu200857


"future_vba_expert" wrote:

I think you would have to enter 2 formulas, with the 2 different formats, one
for A1 A2, and one for A2 A1. Don't see how 1 formula with MAX can do
this, but please enlighten me if it is possible. Thanks.
--
future_vba_expert


"Gary''s Student" wrote:

Format Conditional formatting... FormulaIs =A1=MAX(A1:A2) and pick the
format, etc.
--
Gary''s Student - gsnu200857


"Bob Arnett" wrote:

I would like it to display the results of a cell formula in the same format
that is in the referenced cell.
For instance (simplified):
Cell A1 is formatted in Bold and Red.
Cell A2 is formatted in Italics and Blue.
The formula in B1 is =Max(a1:a2)
Then B1 would display in Bold and Red if A1 was the higher of the two
numbers but in Italics and Blue if A2 was the higher.
Is there a way to do this?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 Excel conditional formating, reference cell containing specif Lostinthought Excel Discussion (Misc queries) 1 May 16th 08 12:41 AM
Can I include a picture in a formula i.e. if cell a26 >90% then s. PACF Excel Discussion (Misc queries) 24 December 6th 07 10:29 PM
How do I include TEXT in the same cell with a FORMULA? NJCHAZ Excel Discussion (Misc queries) 2 June 21st 07 05:39 PM
Cell Formating in VLookup formula Mike Lindsay Excel Worksheet Functions 3 May 4th 06 02:58 AM
how to include a cell reference that is contained in a cell withi. dutchinny Excel Worksheet Functions 5 October 24th 05 01:07 AM


All times are GMT +1. The time now is 08:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"