Formula to copy data as well as all formatting

honkin

Active Member
Joined
Mar 20, 2012
Messages
385
Office Version
  1. 2016
Platform
  1. MacOS
I have a formula which helps me keep one sheet updated when data in another sheet is updated, but one disappointing thing is only the contents of the original cell come across, not the formatting. Many of the cells are colour-coded for different price ranges, or negative numbers coloured differently to positive numbers. I'd like that same format to accompany the data.

Is this at all possible?

Here is the code

Rich (BB code):
=IFERROR(INDEX('[predictology-ai-predictions.xlsx]Predictology'!$F$2:$F$49997,MATCH(1,INDEX((A26068='[predictology-ai-predictions.xlsx]Predictology'!$A$2:$A$49997)*(B26068='[predictology-ai-predictions.xlsx]Predictology'!$B$2:$B$49997)*(C26068='[predictology-ai-predictions.xlsx]Predictology'!$C$2:$C$49997),0,1),0)),"No")

Basically if columns A, B & C match, the data in F, in this instance, comes into where I put this code, but only the numbers come across

Here is an example of the look of some cells

Screen Shot 2565-01-22 at 12.06.10.png


Is there a way to amend my formula so the contents of the cell come across, including all formatting?

Cheers
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
No, a formula cannot apply formatting like that.

If the original colours are applied by Conditional Formatting then perhaps it may be possible to apply similar Conditional Formatting in the formula worksheet but that would depend on exactly what that CF was.

Otherwise, your only option would be to take a completely different approach and do the job with vba.
 
Upvote 0
Solution
No, a formula cannot apply formatting like that.

If the original colours are applied by Conditional Formatting then perhaps it may be possible to apply similar Conditional Formatting in the formula worksheet but that would depend on exactly what that CF was.

Otherwise, your only option would be to take a completely different approach and do the job with vba.
Thanks Peter. May see if I can find the CF that was used, if not, maybe vba is a solution

cheers
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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