Jump to content

Excel Make Row Some Color


Recommended Posts

Hey there, I am trying to figure out how to fill an Excel row with a color, if some condition.  For example:

 

$sColor = #FFF000 
For $iCC = 1 To Ubound($aArray)-1
    $sRange = "A:" & $iCC
    If _Excel_RangeReady($oWorkbook, $sRange) = "Some String" Then _Excel_FillInRowWithColor($iRowToFillIn, $sColor)
Next

 

Anyone know how to do that?  Thanks!

Edited by litlmike
Link to comment
Share on other sites

2 hours ago, litlmike said:

Hey there, I am trying to figure out how to fill an Excel row with a color, if some condition.  For example:

 

$sColor = #FFF000 
For $iCC = 1 To Ubound($aArray)-1
    $sRange = "A:" & $iCC
    If _Excel_RangeReady($oWorkbook, $sRange) = "Some String" Then _Excel_FillInRowWithColor($iRowToFillIn, $sColor)
Next

 

Anyone know how to do that?  Thanks!

I don't know what _ExcelRangeReady() is, I thing is probably a typo from you, but you can change a Cell color like this:

With $oExcel.ActiveSheet
    .Range("A1").Interior.Color = 0xFFFF99
EndWith

Or Like this:

With $oExcel.ActiveSheet
    .Range("A1").Interior.ColorIndex = 6
EndWith

Regards
Alien.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...