Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #37  
Old 06-24-2014, 10:33 AM
EC37 EC37 is offline NEWB to Macros - formatting exports Windows 7 64bit NEWB to Macros - formatting exports Office 2010 64bit
Advanced Beginner
NEWB to Macros - formatting exports
 
Join Date: May 2014
Location: Waltham, MA
Posts: 56
EC37 is on a distinguished road
Default

You're not quite done with me yet.

Conditional Formatting: I've attempted, and so far, failed. I threw the statement in after a simple Autofit statement I plugged in, and just before the section that starts the definition of items pertaining to Grouping. I'll include a couple of rows before and after so you can see where I've inserted it. But just so you know, by me inserting this statement it did the following:
It formatted only certain cells that met the criteria (criteria: =$B2=1). For whatever reason, it left some rows unformatted even though they met the criteria.


Here is the Code:

Cells.Select
Cells.EntireColumn.autofit
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$B2=1"
Selection.FormatConditions(Selection.FormatConditi ons.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Strikethrough = False
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
Selection.FormatConditions(1).StopIfTrue = False
rz = Range("L1").End(xlDown).Row
Dim rStart, rEnd
rEnd = 1

And just so you are aware- I retrieved the above in red by recording my actions, and then inserted it into the equation.

P.S. - I think I know what part of the problem is: It is Applying the formula to the ENTIRE spreadsheet (=$1:$1048576). When it should only be applying to =$A2:$L264. Or, perhaps I could assign the "Applies to" to be something similar to what we used to color our Phase/Sub-Phase lines:

Set cz = Range("A1").End(xlDown)
For jr = 2 To cz.Row
Set org = Range("A" & jr & ":L" & jr)

Just not sure how i would incorporate it into Conditional Formatting.

Last edited by EC37; 06-24-2014 at 10:43 AM. Reason: P.S.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting contents after Tab of continuous lines or formatting specific area of word pawii Word 1 05-12-2014 05:24 AM
macros stebrownsword Word VBA 0 08-28-2013 01:16 AM
NEWB to Macros - formatting exports How to do Formatting Using Macros anju16saini Word VBA 1 03-11-2013 04:15 AM
NEWB to Macros - formatting exports Formatting with macros WaltR Word VBA 8 05-15-2012 06:28 PM
Macros nore Outlook 0 06-01-2011 04:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft