ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range array need it in one statement? (https://www.excelbanter.com/excel-programming/317656-range-array-need-one-statement.html)

Simon Lloyd[_613_]

Range array need it in one statement?
 

Hi, anyone know how to get the following in one statement? Those ar
the ranges that i want the count by colour function to work on only
dont know how to string them together in one statement so that th
product will be returned in Range B6

Thanks in advance!

Simon

Range("B6").Select
ActiveCell.FormulaR1C1 = "=CountByColor(R[8]C[3]:R[497]C[3],38,FALSE)"
ActiveCell.FormulaR1C1 = "=CountByColor(R[8]c[5]:r[497]c[5],38,FALSE)"
ActiveCell.FormulaR1C1 = "=CountByColor(r[8]c[7]:r[497]c[7],38,FALSE)"
ActiveCell.FormulaR1C1 = "=CountByColor(r[8]c[9]:r[497]c[9],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[11]:r[497]c[11],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[13]:r[497]c[13],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[15]:r[497]c[15],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[17]:r[497]c[17],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[19]:r[497]c[19],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[21]:r[497]c[21],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[23]:r[497]c[23],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[25]:r[497]c[25],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[27]:r[497]c[27],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[29]:r[497]c[29],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[31]:r[497]c[31],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[33]:r[497]c[33],38,FALSE)"
ActiveCell.FormulaR1C1
"=CountByColor(r[8]c[35]:r[497]c[35],38,FALSE)

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=31996



All times are GMT +1. The time now is 01:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com