Andreas Hermle
asked on
applying shading to rows using VBA
Dear Experts:
I got a list with thousands of rows with the following make-up. For example
Column A Column B
90-234-58-75 Product A
Quantity 38
Marking 100
90-234-58-59 Product B
Quantity 90
Marking 95
etc.
I would like to apply shading to these rows in an orderly/uniform manner using a VBA macro so that ...
... rows with the product numbers get a red shading ...
... the rows featuring the quantity get a grey shading
... the rows featuring the marking get a dark grey shading
I have attached a sample file with details for your convenience.
Thank you very much for your great help.
Regards, Andreas
Row-Formatting-Macro.xlsx
I got a list with thousands of rows with the following make-up. For example
Column A Column B
90-234-58-75 Product A
Quantity 38
Marking 100
90-234-58-59 Product B
Quantity 90
Marking 95
etc.
I would like to apply shading to these rows in an orderly/uniform manner using a VBA macro so that ...
... rows with the product numbers get a red shading ...
... the rows featuring the quantity get a grey shading
... the rows featuring the marking get a dark grey shading
I have attached a sample file with details for your convenience.
Thank you very much for your great help.
Regards, Andreas
Row-Formatting-Macro.xlsx
ASKER
Conditional Formatting, sounds interesting? But how is this done?
Thank you, Regards, Andreas
Thank you, Regards, Andreas
ASKER
There is a slight error in my sample file
The 'Quantity' and 'Marking' entries are not mentioned in the sample table only in the shaded version of this table.
The 'Quantity' and 'Marking' entries are not mentioned in the sample table only in the shaded version of this table.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Steve,
thank you very much for your swift help. Unzipping your file results in strange file types.
But I managed to open the xml file and I could see the formulas behind the condtional formatting. I will try them out and let you know. This will take a while since I need to look after some other stuff right now. Thank you very much. Regards, andreas
thank you very much for your swift help. Unzipping your file results in strange file types.
But I managed to open the xml file and I could see the formulas behind the condtional formatting. I will try them out and let you know. This will take a while since I need to look after some other stuff right now. Thank you very much. Regards, andreas
It shouldn't need unzipping....
It has probably just lost the .xlsx extension.
The expert exchange file name convention is a tad longer than it needs to be.
(an xlsx file is just a zipped folder in disguise)
C--Users-shall-Desktop-Example.xlsx
It has probably just lost the .xlsx extension.
The expert exchange file name convention is a tad longer than it needs to be.
(an xlsx file is just a zipped folder in disguise)
C--Users-shall-Desktop-Example.xlsx
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for AndreasHermle's comment #a40211452
for the following reason:
Hi Steve,
great, works like a charm, thank you very much for your great help. Regards, Andreas
Accepted answer: 0 points for AndreasHermle's comment #a40211452
for the following reason:
Hi Steve,
great, works like a charm, thank you very much for your great help. Regards, Andreas
Andreas, it seems you have accepted your own solution and closed the question.
I guess in error after the comment that it works like a charm.
I have opened the question back up for you to hopefully allocate points to my solution.
Thanks,
Steve,
I guess in error after the comment that it works like a charm.
I have opened the question back up for you to hopefully allocate points to my solution.
Thanks,
Steve,
ASKER
Oooops, Steve, I am really sorry, my fault of course.
Also, Thank you for bringing this zip/xlsx issue to my attention.
Again, thank you very much for your great and professional help.
Regards, Andreas
Also, Thank you for bringing this zip/xlsx issue to my attention.
Again, thank you very much for your great and professional help.
Regards, Andreas
Are you sure you only want a VBA solution?