MrDB4Excel
Active Member
- Joined
- Jan 29, 2004
- Messages
- 348
- Office Version
- 2013
- Platform
- Windows
I have read through various sites about adding a conditional format to VBA and found too much confusion. Not being very prolific in creating a VBA macro that can do this I am turning to Mr. Excel in the hopes someone can enlighten me and help to bring this to a conclusion.
First of all, I need this macro to run on any sheet within the workbook.
I have twelve such workbooks, each indicated by the month, i.e. 01-January.xlsm, 02-February.xlsm, 03-March.xlsm, 04-April.xlsm, etc., and each one needs to acquire and have available this macro. This may imply that I don’t want to have to open each of these workbooks and add this macro but that this macro will automatically become available as I open subsequent xlsm files. If not then so be it and I will simply copy this macro into the remaining eleven workbooks.
The macro needs to provide a selection prompt (because each sheet in a workbook will have different range selections), and from there it simply executes the desired attributes of a conditional format. This conditional format is as follows: highlight cell rules, and text that contains: “DuckDuckGo”, the format is simply to highlight these cells in this selected range with yellow fill that contains the text DuckDuckGo.
The attached Xl2bb Mini Sheet is a very small example of what some days produce, sometimes as many as 200 to 500 rows of web searches, and as you can see this is only what I have accumulated thus far today 19 March 2024. Obviously, many days include website visits that range from music, science, physics, cosmos, computer IT, DIY Handyman, religion, philosophy, politics, travel, humor, movies and films, healthcare, recipes, miscellaneous, financial, and this is only a small portion of the things I daily visit. I say this only because a sheet showing hundreds of site visits will only have a smaller portion of those visits relevant to DuckDuckGo.
Any help will be very much appreciated as this is something I do every day, that is, I collect all website history for each day, and before the computer shuts down at day's end, I delete all history. This exercise allows me to save important website visits while cleaning out my C drive.
First of all, I need this macro to run on any sheet within the workbook.
I have twelve such workbooks, each indicated by the month, i.e. 01-January.xlsm, 02-February.xlsm, 03-March.xlsm, 04-April.xlsm, etc., and each one needs to acquire and have available this macro. This may imply that I don’t want to have to open each of these workbooks and add this macro but that this macro will automatically become available as I open subsequent xlsm files. If not then so be it and I will simply copy this macro into the remaining eleven workbooks.
The macro needs to provide a selection prompt (because each sheet in a workbook will have different range selections), and from there it simply executes the desired attributes of a conditional format. This conditional format is as follows: highlight cell rules, and text that contains: “DuckDuckGo”, the format is simply to highlight these cells in this selected range with yellow fill that contains the text DuckDuckGo.
The attached Xl2bb Mini Sheet is a very small example of what some days produce, sometimes as many as 200 to 500 rows of web searches, and as you can see this is only what I have accumulated thus far today 19 March 2024. Obviously, many days include website visits that range from music, science, physics, cosmos, computer IT, DIY Handyman, religion, philosophy, politics, travel, humor, movies and films, healthcare, recipes, miscellaneous, financial, and this is only a small portion of the things I daily visit. I say this only because a sheet showing hundreds of site visits will only have a smaller portion of those visits relevant to DuckDuckGo.
Any help will be very much appreciated as this is something I do every day, that is, I collect all website history for each day, and before the computer shuts down at day's end, I delete all history. This exercise allows me to save important website visits while cleaning out my C drive.
03-March.xlsm | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
2 | D | Excel VBA To Allow User To Select A Range With An InputBox | Get input from the user using Input Box - YouTube | https://www.youtube.com/watch?v=lL8z7WRigK4 | IT-Technical-Computer | 3/19/2024 07:31 | ||
3 | Iexc | how to cause vba to ask for user input for a range selection to finish the vba at DuckDuckGo | https://duckduckgo.com/?hps=1&q=how+to+cause+vba+to+ask+for+user+input+for+a+range+selection+to+finish+the+vba&atb=v319-1 | DuckDuckGo>>>Excel | 3/19/2024 07:29 | ||
4 | Iexc | how to create a quick access toolbar button that automatically applies a special conditional format to a selected range at DuckDuckGo | https://duckduckgo.com/?hps=1&q=how+to+create+a+quick+access+toolbar+button+that+automatically+applies+a+special+conditional+format+to+a+selected+range+&atb=v319-1 | DuckDuckGo>>>Excel | 3/19/2024 07:25 | ||
5 | D | Is there a way to apply conditional formatting with one click? - Microsoft Community | https://answers.microsoft.com/en-us/msoffice/forum/all/is-there-a-way-to-apply-conditional-formatting/84868157-d819-4cba-a69c-099f88ce7515 | IT-Technical-Computer | 3/19/2024 07:25 | ||
6 | D | Using Conditional Formatting with Excel VBA - Auto VBA | https://www.autovbax.com/learn/vba/conditional-formatting.html | IT-Technical-Computer | 3/19/2024 07:41 | ||
7 | D | Using Conditional Formatting with Excel VBA - Automate Excel | https://www.automateexcel.com/vba/conditional-formatting/ | IT-Technical-Computer | 3/19/2024 07:27 | ||
8 | D | VBA To Allow User To Select A Range With An InputBox | https://www.thespreadsheetguru.com/select-range-with-inputbox/ | IT-Technical-Computer | 3/19/2024 07:29 | ||
9 | Iexc | vba to create a special conditional format to a selected range at DuckDuckGo | https://duckduckgo.com/?hps=1&q=vba+to+create+a+special+conditional+format+to+a+selected+range&atb=v319-1 | DuckDuckGo>>>Excel | 3/19/2024 07:27 | ||
10 | E | HERE GOES NOTHING | Spray Foaming Our Shipping Container - YouTube | https://www.youtube.com/watch?v=uamfKXoNaZI | DIY-Handyman-Misc | 3/19/2024 08:11 | ||
11 | E | Off Grid Solar Container Home Vs. Spring Hail Storms | Green House Prep - YouTube | https://www.youtube.com/watch?v=CWTUNYSot6Q | DIY-Handyman-Misc | 3/19/2024 08:15 | ||
12 | J | When patients ask if a crown can be biomimetic...✨ #shorts #dentalcrowns #dentist - YouTube | https://www.youtube.com/shorts/p5aEp2_T3cw | Health-Life-Homecare | 3/19/2024 08:12 | ||
_19 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D2:D12 | D2 | =IF((ISERROR(XLOOKUP(A2,'01Sort-Types'!$R$47:$R$73,'01Sort-Types'!$S$47:$S$73,0))),"",(XLOOKUP(A2,'01Sort-Types'!$R$47:$R$73,'01Sort-Types'!$S$47:$S$73,0))) |