LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default VBA script

1. I have this formular written with VBA as follows, it is working
fine. Where the string "key is zero", however, I would like to replace
it with the next formular. That would say, if the condition is true,
format the range with this color.

Range("B17:D17").Select
ActiveCell.FormulaR1C1 =
"=IF(COUNTA(RC[4]:RC[10])<0,IF(RC[3]=0,""key is
zero"",""""),IF(RC[3]<0,""data is zero"",""""))"

Formular replacing the above string "key is zero",
Range("B17:D17").Select
With Selection.Interior.ColorIndex = 6
.Pattern = xlSolid
End With


2. I want to do the above for rows from 17 to 200.

Thanks for your input.

Faye

 
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
vba script help anthony Excel Programming 2 May 8th 05 06:42 PM
Help with VB script please? Peter[_28_] Excel Programming 5 October 13th 04 11:49 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
VB Script help Quanchi Excel Programming 3 October 6th 03 03:13 PM


All times are GMT +1. The time now is 08:53 PM.

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

About Us

"It's about Microsoft Excel"