litlmike Posted May 6, 2016 Posted May 6, 2016 (edited) 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 May 6, 2016 by litlmike _ArrayPermute()_ArrayUnique()Excel.au3 UDF
alien4u Posted May 6, 2016 Posted May 6, 2016 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now