Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Conditional Formating issue

hi all,

i am trying to add a Conditional Formatting to a serie of cells -

D3: =B3<""
D4: =B4<""
D5: =B5<""
etc

the routine i have is this:

Workbooks(sTestcase). _
Sheets("TestScripts"). _
Range("A1"). _
Offset(iRowL + 1, 3).FormatConditions.Delete
sFormat = "=" & "B" & iRowL + 1 & "<"""""
Workbooks(sTestcase). _
Sheets("TestScripts"). _
Range("A1"). _
Offset(iRowL + 1, 3). _
FormatConditions. _
Add Type:=xlExpression, Formula1:=sFormat

the issue is, if i check on the Conditional Formating on the worksheet,
the formula is as follow:

D3: =E3<""
D4: =E4<""
D5: =E5<""
etc.

as you might expect this is not the desired result - if anybody could
clarify what i am missing or where i am going wrong, this would be
mostly appreciated.

cheers...

...jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Conditional Formating issue

Jurgen,

The problem is that the cell is being adjusted to wherever the active cell
is at the time.

Try this modified line

sFormat = "=" & "$B$" & iRowL + 1 & "<"""""

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jurgenC!" <jurgen1967ATyahoo.com.au wrote in message
...
hi all,

i am trying to add a Conditional Formatting to a serie of cells -

D3: =B3<""
D4: =B4<""
D5: =B5<""
etc

the routine i have is this:

Workbooks(sTestcase). _
Sheets("TestScripts"). _
Range("A1"). _
Offset(iRowL + 1, 3).FormatConditions.Delete
sFormat = "=" & "B" & iRowL + 1 & "<"""""
Workbooks(sTestcase). _
Sheets("TestScripts"). _
Range("A1"). _
Offset(iRowL + 1, 3). _
FormatConditions. _
Add Type:=xlExpression, Formula1:=sFormat

the issue is, if i check on the Conditional Formating on the worksheet,
the formula is as follow:

D3: =E3<""
D4: =E4<""
D5: =E5<""
etc.

as you might expect this is not the desired result - if anybody could
clarify what i am missing or where i am going wrong, this would be
mostly appreciated.

cheers...

..jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Conditional Formating issue

hi Bob...

...thanks a million - that fixed my issue.

have a good day - jurgenC!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Formating issue Ramone Excel Discussion (Misc queries) 2 February 18th 07 01:41 AM
Primary Axis(X) Formating Issue Raul Charts and Charting in Excel 6 November 10th 06 05:44 AM
Formating Issue Dave Excel Discussion (Misc queries) 0 January 19th 06 02:48 PM
Conditional Formating issue..... WalterT. Excel Worksheet Functions 3 December 9th 05 12:31 AM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM


All times are GMT +1. The time now is 10:15 AM.

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"