• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Copying Conditional Formatting with Absolute References|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Copying Conditional Formatting with Absolute References|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Copying Conditional Formatting with…
sp_PrintTopic sp_TopicIcon
Copying Conditional Formatting with Absolute References
Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
1
January 21, 2017 - 8:15 am
sp_Permalink sp_Print

Hello,

I have rows using icons sets for the conditional formatting. The icon dialog boxes require a value or percentage. In my case, I'm using a simple formula to check if the value is greater than a row two rows above. Please see the attachment. If the formula evaluates to TRUE, then apply the rule. It works fine. But when I copy the formatting, whether by Format Painter or other means, the value field remains absolute, and points to the wrong column. When I try to change the field to a relative formula, Excel won't let me--it must be an absolute reference.

Microsoft online help says this:

"If you’ve used a formula in the rule that applies the conditional formatting, you might have to adjust relative and absolute references in the formula after pasting the conditional format."

That means I would have to adjust about 60 formulas, one by one. Is there a workaround for this problem?

Paul

sp_AnswersTopicSeeAnswer See Answer
Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
2
January 21, 2017 - 9:48 am
sp_Permalink sp_Print

There is no attachment.

Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
3
January 21, 2017 - 10:51 am
sp_Permalink sp_Print

Oops! I've had problems uploading in certain formats. I copied a pic into an Excel file, and that should work.

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
4
January 21, 2017 - 11:21 am
sp_Permalink sp_Print

Can't read your binary file. Can you post in XLSX or XLSM instead?

Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
5
January 21, 2017 - 11:26 am
sp_Permalink sp_Print

Okay.

Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
6
January 22, 2017 - 12:32 am
sp_Permalink sp_Print

Hi Paul, the .xlsx didn't work here but after I changed that file in .xlsb I saw the screenshot!

I'm afraid it's not possible to use relative references when using the Pictograms (Iconset). When I try to rebuild your case, there comes a message when I try to change absolute in relative that says that's not allowed when using color scales, something I can't translate so quick and iconsets.

So you have to find another workaround I'm afraid. It would help if you have a sample file so we can look with you and think with you which possibilities there are. You managed to sent two files so maybe also a 'normal' file with some of your data? 

Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
7
January 22, 2017 - 5:14 am
sp_Permalink sp_Print

I'm afraid you're right. Here's a sample file. Thanks.

Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
8
January 22, 2017 - 6:43 am
sp_Permalink sp_Print

Thanks for your example file Paul. Yes with this kind of Conditional Formatting you have to make the Conditions for every Column. I don't see another way, but maybe somebody else here does?

I think you understand that with other kinds of Conditional Formatting this is not the case?

I was thinking of a kind of 'workaround' with some helper columns, but can't make it working. Maybe later.

Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
9
January 22, 2017 - 7:20 am
sp_Permalink sp_Print

Maybe it's possible Paul, see attached file (if I can upload, this is my second third attempt, it has some problems (and now I save my text for next cases...) (AH you have to drag your file in, that works!)

In this example you see the following: I made first the conditional format in column F (without data in it). After that referred the content of the F column to the C column. That worked perfect. Then copied the F column to G and that is also OK!

So I think you maybe can do it this way: fill your data in all columns. Make one column which refers to the most left one and do there your conditional formatting and copy that column to the right as many times as necessary. Hide the original datacolumns after that.

Give it a try!

Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
10
January 22, 2017 - 8:04 am
sp_Permalink sp_Print

Frans,

Thank you for working on this. I tried to duplicate what you did, above, but it wasn't successful. When I checked the cell reference it was still absolute, not relative.

Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
11
January 22, 2017 - 8:14 pm
sp_Permalink sp_Print

Oh sorry, must admit you're right. In all the changing and copying I must have overlooked something. Sorry.

I'll look for another kind of workaround but that takes some more time. In the meantime you can fix your sheet by doing it by row, so it's finished 🙂

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
12
January 23, 2017 - 10:39 am
sp_Permalink sp_Print

Hi Paul

As you already know, you can't change the formula to relative when using icon sets. You will need to change them one by one.

I would suggest you use helper columns with formulas and then format the columns using the icon sets.

I have attached an example for you.

Sunny

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
13
January 23, 2017 - 4:03 pm
sp_Permalink sp_Print

Hi Paul

I have written a macro for your specific needs. You will need to change some settings for the macro to run.

See the instructions in the attachment.

Please test on a copy of your data as the macro cannot be undone.

The macro will apply the CF to the selected cells and change the cell reference to the correct column and row but its address remain absolute.

Hope this helps.

Sunny

Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
14
January 24, 2017 - 7:37 am
sp_Permalink sp_Print

Thanks for the work you did on this. I went in to edit your macro, but I have no experience with VBA. My only ability with macros is Record a macro, but beyond that, nothing. I couldn't see where to edit rows or anything.

I tried several times to record my own macro, going through the dialog boxes in the Conditional formatting menu, but it wouldn't work properly.

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
15
January 24, 2017 - 9:09 am
sp_Permalink sp_Print

Hi Paul

You will only need to change the number in red. 

RowToCompare = 3 'Change this number to the row number you want to compare against.

 

I have already set it to 3 to match your file.

3 is the row number you wanted to compare against. Change this number if needed.

Unfortunately you cannot record a macro to get the codes that I gave you. It must be coded manually.

Sunny

Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
16
January 24, 2017 - 11:10 am
sp_Permalink sp_Print

Yes, it works! Fantastic! How do I copy this VBA to another workbook?

Paul

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
17
January 24, 2017 - 11:35 am
sp_Permalink sp_Print

Hi Paul

Just open both workbook. Press ALT-F11 to display the VBA screen. Drag Module 1 from your current workbook to the new workbook.

You can also copy the code and paste it to the new workbook.

Sunny

sp_AnswersTopicAnswer
Answers Post
Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
18
January 24, 2017 - 2:16 pm
sp_Permalink sp_Print

Thanks, Sunny. Works great now. I can't thank you enough--it has saved me hours of tedious work. I could conquer the world if I knew VBA. I must learn how to do this. Perhaps MyOnlineTrainingHub offers a course.

Paul

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
19
January 24, 2017 - 3:35 pm
sp_Permalink sp_Print

Hi Paul

I am happy to know it is working for you. VBA is definitely the way to go if you want to "conquer the world", as you put itSmile.

I am sure MOTH would have some courses to help you improve on your Excel skills.

Sunny

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Sameh Alami
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 188
Newest Members:
JUDY MLL
Scot Bailey
Kate Dyka
Kwaje Alfred Mogga
thong nguyen
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Forum Stats:
Groups: 3
Forums: 24
Topics: 6548
Posts: 28672

 

Member Stats:
Guest Posters: 49
Members: 32834
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.