ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I copy cell formats in functions? (https://www.excelbanter.com/excel-worksheet-functions/36488-how-can-i-copy-cell-formats-functions.html)

Twitty Kitty

How can I copy cell formats in functions?
 
Is it possible to copy the format of a cell from one worksheet to another
within a statement? for example if I want to copy the formatting of the text
in cell Go!B1 when Cell Go!A1 is null I know I can check for the condition
using:

If(Go!A1="",Go!B1,Go!A1)

This statement will put the text of either Go!A1 or Go!B1 into the selected
cell depending on if cell Go!A1 is empty or not. If it is empty, then this
is a header row and the text is in B1 so I want to copy that text (and its
formatting if possible) to the summary sheet.

The Summary sheet is dynamic so the rows can change, which is why I want to
link the data rows via statements rather than hardcoding them.

Is there any way to include the formatting of the text in the "copy" process
of the statement when the cell being copied is the header?

Any and all help and ideas are appreciated!
--
Searching for Enlightenment

Debra Dalgleish

A formula can't return the formatting from another cell, only the value.
Perhaps you could use conditional formatting to change the appearance,
based on the formula results.

Twitty Kitty wrote:
Is it possible to copy the format of a cell from one worksheet to another
within a statement? for example if I want to copy the formatting of the text
in cell Go!B1 when Cell Go!A1 is null I know I can check for the condition
using:

If(Go!A1="",Go!B1,Go!A1)

This statement will put the text of either Go!A1 or Go!B1 into the selected
cell depending on if cell Go!A1 is empty or not. If it is empty, then this
is a header row and the text is in B1 so I want to copy that text (and its
formatting if possible) to the summary sheet.

The Summary sheet is dynamic so the rows can change, which is why I want to
link the data rows via statements rather than hardcoding them.

Is there any way to include the formatting of the text in the "copy" process
of the statement when the cell being copied is the header?

Any and all help and ideas are appreciated!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Twitty Kitty

Thank you Debra. that cleared up one question. Now all I need to figure out
is how to get conditional formatting to "accept" references to another
worksheet, or a way around that... Any Ideas?
--
Searching for Enlightenment


"Debra Dalgleish" wrote:

A formula can't return the formatting from another cell, only the value.
Perhaps you could use conditional formatting to change the appearance,
based on the formula results.

Twitty Kitty wrote:
Is it possible to copy the format of a cell from one worksheet to another
within a statement? for example if I want to copy the formatting of the text
in cell Go!B1 when Cell Go!A1 is null I know I can check for the condition
using:

If(Go!A1="",Go!B1,Go!A1)

This statement will put the text of either Go!A1 or Go!B1 into the selected
cell depending on if cell Go!A1 is empty or not. If it is empty, then this
is a header row and the text is in B1 so I want to copy that text (and its
formatting if possible) to the summary sheet.

The Summary sheet is dynamic so the rows can change, which is why I want to
link the data rows via statements rather than hardcoding them.

Is there any way to include the formatting of the text in the "copy" process
of the statement when the cell being copied is the header?

Any and all help and ideas are appreciated!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



Debra Dalgleish

You can refer to a named range on another sheet.

For example, name Go!A1 as Head01 and Go!B1 as Head02

Then, in conditional formatting in the linked cell, choose Formula Is,
and enter the formula: =Head01=""

There are instructions here for naming ranges:

http://www.contextures.com/xlNames01.html

Twitty Kitty wrote:
Thank you Debra. that cleared up one question. Now all I need to figure out
is how to get conditional formatting to "accept" references to another
worksheet, or a way around that... Any Ideas?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com