Function IF with special use

Mecheltheka

New Member
Joined
Aug 15, 2020
Messages
21
Office Version
  1. 2007
Platform
  1. Windows
Hey to all..
I have a question..
Let's say that I use the function "IF" like this: =IF(A2=B2; B4; C4)… If its true, then it will appear the content of the cell B4. However, when I want to appear the content of the cell with its special formatting, what can I do for this?? (For example, if there is a thick outline around of the B4 cell, I want to appear the content of the cell B4 with the thick outline)
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,384
Office Version
  1. 365
Platform
  1. Windows
You cannot do that with a formula, as a formula can only see the cell value & not it's format.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,384
Office Version
  1. 365
Platform
  1. Windows
It would be possible with a macro, but it really depends on exactly what you want.
For a macro to check all potential formats & styles every time a cell is calculated, would probably bring your workbook to a stand still, if not cause Excel to crash.
 

Mecheltheka

New Member
Joined
Aug 15, 2020
Messages
21
Office Version
  1. 2007
Platform
  1. Windows

ADVERTISEMENT

1597515072588.png

For example, I would like to do something like this. But I want to do it automatically. Have you any idea how to achieve that?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,384
Office Version
  1. 365
Platform
  1. Windows
Considering you have posted an image with absolutely no information, the answer is no.
Also you have merged cells which are an abomination & should be avoided like the plague.
 

Mecheltheka

New Member
Joined
Aug 15, 2020
Messages
21
Office Version
  1. 2007
Platform
  1. Windows
Considering you have posted an image with absolutely no information, the answer is no.
Also you have merged cells which are an abomination & should be avoided like the plague.
Ok, thank you for your time!
 

Watch MrExcel Video

Forum statistics

Threads
1,123,494
Messages
5,602,004
Members
414,490
Latest member
Rip181

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
Top