×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Excel Conditional Formatting and Non VBA solutions

Excel Conditional Formatting and Non VBA solutions

Excel Conditional Formatting and Non VBA solutions

(OP)
Inherited an excel file. Was pretty messed up and have fixed many of the data issues. The person who transferred the file to me is no longer here and the instructions (rules?) were as follows:

If are asked to:
  • add a row, highlight the range in yellow
  • "delete" a row, highlight the range in red
  • change a value, highlight the cell(s) in blue
On the last Monday of month, save and distribute the file
Reset for new month by removing all the coloring
Any new request that comes in will fall under the new month even though the actual date is still under the current month

I started thinking if I add some date cols, then I could use conditional formatting to handle the first two scenarios. It seemed to work well, then the issues came up, since the month of the file is generally one week before end of month, I can't enter today's date and have it highlight as a new record because April is not equal to May. Because of this, added an additional col called Submittal Month and then I put in a cell in B1 and entered the date representing the month so now can key off that to affect the conditional formatting rather than the actual month.

Remaining issues: (can they be achieved without turning this into vba or macro enable workbook)

1.
As part of the review process a copy of the file is sent to another team member who checks one of the date cols and if it needs to be updated, enters the date and colors the cell orange so that it is easily identified. Due to conditional formatting, that takes precedence and the orange color no longer is displayable. My thought was to either add yet another col (undesirable due to scrolling and an extra step on the user's part) or what I ended up doing is altering the conditional format formula to "skip" the col that the other person would be editing so that it can then be manually colored. Visually, this does not look nice, but if that is the only way without code or extra intervention, guess we can live with it.

2.
For conditional formatting on cells that have been edited, any thoughts?

For example:

Asked to please Change Row 367 from
Col B:Description Col C:PartNumber
Paint Cyan	4454 

To

Col B:Description Col C:PartNumber
Paint Blue	4455 

Once I have edited B367 and C367 then those two cells should be highlighted blue until we move on to the next month and reset. I imagine would have to add a col to identify the cells, but is beginning to sound vba-ish.

RE: Excel Conditional Formatting and Non VBA solutions

Hi,

Regarding Conditional Formatting, you need a date column and a new column...

add a row, highlight the range in yellow--put today's date in the date column and a value in the new column.
"delete" a row, highlight the range in red--so where does the RED go if the row is deleted?
change a value, highlight the cell(s) in blue--put today's date in the date column.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!

RE: Excel Conditional Formatting and Non VBA solutions

(OP)
Base on your response: Sorry if my explanation wasn't clear (too much background?)

I have already created the conditional formatting and the (date and new col) and it is doing what it was intended, for the yellow and red and have a work around (not ideal of skipping the date col) so it can be manually colored.

Regarding the blue coloring, it will need more than a date in order to determine which cell to color or are use saying that if I have 10 cols, I have to create an additional 10 date cols to handle each cell that potentially might be changed?
I can't key off of "today's date" due to the month overlap and have to use a generic date for the month the changes apply to. Since we are still in the month of April, and currently the file/report is for May I need to have both April and May dates and only those dates in April that relate to May rather than April.

If explanation still murkey, let me know.

RE: Excel Conditional Formatting and Non VBA solutions

Quote:

manually colored.

???Why???

A visual example would help. But YES, under the conditions you're describing, you need a date for each change.

This is where VBA could be a better choice for the BLUE color. Id use a Hidden or Very Hidden sheet to store the date, using the same cell reference, driven by the Worksheet_Change Event. You must also address month-beginning initialization.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!

RE: Excel Conditional Formatting and Non VBA solutions

>"delete" a row, highlight the range in red
I take you don't really want to 'delete' the row and this row to be gone, just to 'mark it' as being deleted by 'highlight [the row] in red' ponder

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Excel Conditional Formatting and Non VBA solutions

(OP)
Andy, correct, not deleting in the sheet. The previous person had been deleting, but the new instructions are to keep it in the list and just show it as deleted, so I have placed conditional formatting in the curent period show as red and then previous period will show as strike through.

Skip, I have attached a sample. Hopefully it will better express what I wrote. However, based on my understanding of your message, looks like I may have to go the vba route to make it work. I'm concerned that people may have security issues with receiving code enabled files. Most around here don't do anything beyond the very basic stuff and will think there is a problem after 3 years of getting this file and having to deal with a security popup. They may be suspicious.

Or maybe I should scrap conditional formatting and use vba to color the cells and save a copy of the file to a standard xlsx format?


Tab Step6Conditional Format is how it looks now (second tab)
Tab Step6Not Conditionally Formatted is how it should look (third tab)

Notice in cell H6 on the second tab is yellow and blank. When I receive it back from the other team member, it should look like cell H6 on the third tab (orange and has a date)

The items on the third tab rows 8 and 9 are highlighted blue because I changed them from what they show on the second tab.

Once we move on to the next month, then all the coloring should be gone with the exception of the strike through.

RE: Excel Conditional Formatting and Non VBA solutions

Thanks for providing a workbook as an example.

So what are ALL the CF criteria for CHANGING values that are displayed on the Step6NotConditionalFormat?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!

RE: Excel Conditional Formatting and Non VBA solutions

We are at a disadvantage,

1) not knowing or understanding the purpose of these requirements
2) not knowing or understanding the process and frequency
3) not knowing or understanding the level of security or impact this has on your business

This smells like a chain-of-custody type of process. Well this could be a low-risk thing or high-risk. Depending on the level of risk, it could be done in Excel, as you intend OR it should be totally automated with fail-safe procedures to track each change to the person, date & time, previous state and present state or something in the middle???

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!

RE: Excel Conditional Formatting and Non VBA solutions

Just a suggestion...
Add another column:
Status
  • New - add a row, highlight the row in yellow
  • Deleted - "delete" a row, highlight the row in red
  • Changed / Modified - change a value, highlight the cell(s) in blue
Easy for Conditional Formatting to do at least first two Statuses...ponder

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Excel Conditional Formatting and Non VBA solutions

Quote:

Changed / Modified - change a value, highlight the cell(s) in blue

But it appears to be more complicated than that.

On a row you might have multiple changes, and maybe multiple colors. So you must accommodate row, column and color, multiple times. And I don't think that the OP wants the operator having to add those notations.

But it seem that currently, each person colors their own changed cells. Why not simply continue that.

Then just code an initialization procedure to clear all such color notations and strike-through "deleted" rows.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!

RE: Excel Conditional Formatting and Non VBA solutions

(OP)
Based on the discussion so far, I'll see how it goes with the level of automation I currently put into the sheet since it is about 90% of the way there. That way, hopefully all I have to remember with each "new month" to only need to search for the blue items to clear out.

Too bad that you can't manually override conditional formatting simply by changing the color of the cell.
Sometimes what seems the simplest thing on the surface is actually complicated to implement.

Thanks to both of you for your input.

RE: Excel Conditional Formatting and Non VBA solutions

>seems the simplest thing on the surface is actually complicated to implement
... or sometimes we use just the wrong tool for the job.
Just my opinion, but maybe a simple data base with some basic GUI would do a lot better job... ponder

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Excel Conditional Formatting and Non VBA solutions

(OP)
Of course my first instinct was to use Access as that is what I used for most things, but due to the state of how the original spreadsheet was when I received it and still having the issue of identifying the different colors and that no one else is using a database or would be willing to (that goes double for the external receivers of this spreadsheet), this is the result.

RE: Excel Conditional Formatting and Non VBA solutions

Unfortunately, can't see a simple way to do this in excel without at least a small amount of VBA or at least some manual intervention.

For example' Skip's suggestion of using a hidden sheet would work for the blue cells, but we don't have to track dates in it. All you need to do when creating a new month worksheet is to duplicate the existing sheet to a new sheet in the workbook; let's call it "Mirror" - hide it or very hide it if wished. Then all we need is a conditional rule that applies to the same ranges as your existing rules as follows: =Mirror!A4<>A4

Here's your example workbook with this included. Used the original Step6ConditionalFormat and copied it in its entirety to Mirror. Added the new conditional rule to Step6ConditionalFormat and then modified cells E8, B9, E9 as per "Step6Not ConditionallyFormated" - and, as we can see, we get the required highlighting.






RE: Excel Conditional Formatting and Non VBA solutions

(OP)
Thanks for the example workbook. I tried it out and saw how it works. However, because we are also adding rows, it causes the new rows to become blue since the new row(s) won't match the mirror.

I had another thought, if I add a new col <P>, can the conditional format use that to derive the fields to apply the color to?

After thinking it through this probably won't work either, but putting out there in case someone has an idea of the possibility.

For example if col <P> contains <E> then the conditional formula would evaluate that along with the row and look something like this?

=MONTH($B$1)&YEAR($B$1)=MONTH($L8)&YEAR($L8) AND len(P8) > 0 then Color Cell (E8) -->[the cell reference of the value in cell P8 concatenated with the row number]

I guess that won't work because if as in the case of <P9> we are trying to color both cell <B9> and <E9>.

I have reattached the original file with the inserted col P, no other changes were made.

RE: Excel Conditional Formatting and Non VBA solutions

>adding rows,

Yep, me not paying attention to the full requirements. I revert to my agreement with Skip: this will need a little VBA

RE: Excel Conditional Formatting and Non VBA solutions

(OP)
Appreciate your looking at it. thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close