Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Conditianl formating with AND formula

Hello,

I'm trying to format a column (Range("g1:g7")) based on the value of each row in that column AND the value of the same row in another column

Range("g1:g7").Select
aa = "EMEA"
bb = "South Africa"
daformula = "and($g1=aa,$e1=bb)"
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:=daformula
Selection.FormatConditions(Selection.FormatConditi ons.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -1638844
.TintAndShade = 0
End With

I've tried the above but does not work

Any advise?

Thanks
Avi
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Conditianl formating with AND formula

Hi,

Am Mon, 16 Feb 2015 12:00:31 +0100 schrieb Claus Busch:

aa = "EMEA"
bb = "South Africa"
daformula = "=AND($g1=""" & aa & """,$e1=""" & bb & """)"


or try it this way:

aa = """EMEA"""
bb = """South Africa"""
daformula = "=AND($g1=" & aa & ",$e1=" & bb & ")"


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Conditianl formating with AND formula

Works fine

Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula and Formating Help Jeremy Excel Discussion (Misc queries) 5 September 30th 09 06:05 PM
formula or conditional formating Joseph[_4_] New Users to Excel 2 July 8th 09 10:18 PM
Conditional formating formula Jman Excel Worksheet Functions 2 September 20th 08 01:20 AM
Formula Formating Ryha Excel Worksheet Functions 1 October 6th 06 10:04 AM
Formating with a formula loulou Excel Discussion (Misc queries) 3 April 6th 06 03:07 PM


All times are GMT +1. The time now is 03:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"