Any way to keep the formatting when using a formula in Excel2007

Closed
Sven60 Posts 1 Registration date Thursday October 16, 2014 Status Member Last seen October 16, 2014 - Oct 16, 2014 at 07:32 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 20, 2014 at 11:07 AM
I would like to copy the contents and format of a column of cells and paste them in another column using a formula.

All columns are formatted as type = General
Column A is a list of random IP addresses that are color formatted as green or red cells.
Column C is also a list of IP addresses (a master list)

In column B, I want to take all the IP addresses in column A and line them up on the same row as the IP address in column C (and keep the color formatting from column A).

In column B to get the IP address from column A to line up with the IP addresses in column C, I used the formula:
=IF(ISNA(MATCH(C1,A:A,0)),"",INDEX(A:A,MATCH(C1,A:A,0)))

This works but column B does not have the color formatting as column A

Is there any way to keep the formatting when using a formula?

Thank You
Sven

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Oct 20, 2014 at 11:07 AM
Hi Sven,

Sorry to inform you that formula's are not capable of transferring format.

If you used conditional format to colour column A then you can do the same for column B, otherwise VBA would be the only solution for you.

Best regards,
Trowa

0