Wednesday, September 21, 2016

How to Resolve - conditional formatting and named ranges?

conditional formatting and named ranges

I have a calendar I use each year, and I am updating it by adding VBA code to make it more useful each year.  It shows due dates for applications (i.e.
if the application date is 5/10/11, one column gives the 25 day due date for approval and the 30 day due
date for denial).  The months are non-contiguous (i.e.
January's area is cell range A1:D33, February is F1:I31, March is K1:N33, April is P1:S32, etc.) across the worksheet.
 
I am trying to show conditional formatting for dates that correspond to holidays and general office closure dates.  I have holidays listed in the range BI2:BI14 and have named that range "Holidays".  I have closeures listed in the range BJ2:BJ13 and have
named that range "Closures".  What I would like to do is to make the cell color red for any cell in the actual date ranges (I.e.
January is A3:A33, February is F3:F31, March is K3:K33, April is P3:P32, etc.) that are dates listed in the "Holidays" range, and
gray for any dates listed in the "Closures" range.  I tried recording a macro for this, but it only highlighted the cell for January 1.
 
Is this possible?  Thanks for any help you might be able to give.

Solutions to the Problem conditional formatting and named ranges

Download SmartPCFixer for Free Now

Yes, this is possible.
What I didn't get from your explanation is what is actually contained in your "day" cells?  Is it just the day number, or is there a full date?
If the day cells contain the full date, you can use this formula in conditional formatting:
=MATCH(A3,Holidays,0)>0
where A3 is the cell you are evaluating.  If you select the range A3:A33, but keep A3 as the active cell when you enter the condtional formatting, the formula will be correct for each cell (i.e.
A3 will be treated as a relative reference, not absolute*).
 
If your day cells only contain day numbers, and you have a heading cell for each month with the month name (A2?), and a heading cell for the whole sheet containing the year (A1?), you can use something like this:
=MATCH(DATEVALUE(A3&$A$2&$A$1),Holidays,0)>0
where A3 is the day cell, $A$2 is the cell containing the Month and $A$1 is the cell containing the year.
Removing the leading $ from $A$2 to leave A$2, means you should be able to copy the formatting across the other month columns.
Hope that helps.
Cheers
Rich
 
*Alternatively, you can apply the CF to one cell (A3) and then use the format painter to copy the CF to the other cells in that month.  Double-click on the format painter and you will be able to apply the formatting to F3:F31, then K3:K33, etc...  click
it again to cancel it.

Cleaning your computer, components, and peripherals help keep everything in good working condition and helps prevent germs from spreading. You can't image how dirty the inside of your computer case can get. All the dust and dirt is going to prevent proper air flow and may even prevent the fan from working.

Another Safe way to Fix the Problem: conditional formatting and named ranges:

How to Fix conditional formatting and named ranges with SmartPCFixer?

1. Download Error Fixer. Install it on your computer.

2. After the scan is done, you can see the errors and problems need to be fixed. Click Fix All.

3. When the Fixing part is finished, your computer has been speeded up and the errors have been removed


Related: Best Way to Download Satellite L645-SP4004M WinDVD BD for Toshiba v.10.0.6.110 driver,Download Toshiba Satellite C655D-S5057 Wireless LAN Driver v.8.0.0.258.0,Method to Update & Download Toshiba Satellite L650-BT2N22 Web Camera Application v.2.0.3.37 driver,How Can You Update & Download Toshiba Satellite L775D-S7220GR Value Added Package v.1.6.0130.640204 driver,Download Toshiba Satellite Pro L750-SP5176FM Sleep Utility v.1.4.0025.000101 driver,Best Way to Download NVidia GeForce 6100 VGA Driver v.304.51 Certified,How Can You Update & Download NVidia GeForce 9300/nForce 730i VGA Driver v.310.19 Certified,Method to Download NVidia GeForce GT 330M Driver v.340.65,How Can I Update & Download NVidia GeForce GTX 590 Driver v.280.26 WHQL,Method to Download NVidia Tesla C2050 Driver v.319.17,Way to Download RealTek RTL8100C(L) Driver v.5.01,Way to Download RealTek RTL8100E Drivers v.694,Way to Update & Download RealTek RTL8101L Auto Installation Program v.6.110 driver,Method to Update & Download RealTek RTL8111G PXE and RPL ROM code v.2.58 driver,How to Update & Download RealTek RTL8411B(N) Driver v.10.003,Best Way to Update & Download ASUS A53SV nVidia Graphics Driver v.8.17.12.6686,Method to Herunterladen ASUS K75VJ Intel Rapid Storage Technology Treiber v.11.6.0.1030,How Can You Update & Download ASUS CG8580 Intel Chipset Driver v.9.3.0.1019,Method to Update & Download ASUS K41VD Intel INF Update Driver v.9.1.1.1015,Way to Update & Download ASUS Pro70T NB Probe v.3.0.0026 driver
Read More: Solution to Problem: computer will not boot if USB device is plugged in,Troubleshoot:conditional formatting of a cell referencing two other cells Error,Solution to Error: computer suddenly stopped downloading anything,Troubleshooter of Error: Conditiona Formatting of a cell that has IF statements in it,Tech Support: Connecting to Wireless Router in Windows 7,Can't change homegroup sharing permission,Can't connect XP shared printer to Win7 except as a local printer.__,Can You Connect the LAN Adapter for Wii On your Windows 7 Laptop?,Can These Files Be Deleted,Can’t install Microsoft Flight Simulator X Gold Edition error 1722

No comments:

Post a Comment