copy cell format along with content in an xlookup

schroederdj

New Member
Joined
Jun 21, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Is there a way, without vba code, to bring back the cell format along with contents in an xlookup? If no, can you share the vba coding to bring back the cell format along with contents in an xlookup?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Explain why you want this to happen, how the VBA code is supposed to be called (because cell formula functions will NOT do what you want), and any other relevant information.
 
Upvote 0
I have an xlookup that is running through VBA code. the xlookup works fin and brings back the desired data. However the data source is also formatted (color coded) to mean different things. I would like to bring this formatting along with the the data
 
Upvote 0
Is the color formatting controlled by Conditional Formatting?
If so, you should be able to apply the same Conditional Formatting rules to your destination.

If it is not due to Conditional Formatting, and you do not want to use VBA, then you are out of luck. As Glenn alluded to, Excel formulas can only look at cells values, not any formatting applied on those cells. So there is no way to do it without VBA.
 
Upvote 0
Is the color formatting controlled by Conditional Formatting?
If so, you should be able to apply the same Conditional Formatting rules to your destination.

If it is not due to Conditional Formatting, and you do not want to use VBA, then you are out of luck. As Glenn alluded to, Excel formulas can only look at cells values, not any formatting applied on those cells. So there is no way to do it without VBA.
unfortunately it is not conditional formatting. it is simply red for "problem", yellow "maybe a problem", green "ok" The database has new activity added everyday and I wanted to bring back the same coloring on previously looked at items rather than just the wording for a visual to the user. I think they will have to be satisfied with just the wording. the wording i mention above is ust a sample so it wouldn't always be that wording that could add conditional formatting to.
 
Upvote 0
One potential change you could make is to create a Data Validation List on a column that only has the following three options:
- Problem
- Maybe a problem
- OK

So instead of them selecting a color, they make a selection from the drop-down box.
Then apply three Conditional Formatting rules based off of that field value to apply your three colors automatically.

If you do that, then you can apply the same Conditional Formatting rules on your destination sheet.
 
Upvote 0

Forum statistics

Threads
1,224,984
Messages
6,182,139
Members
453,092
Latest member
dcasuga

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