G
Guest
Hi All
i have a function "getposition(range)" that get the position of the 4 higher
values in that range and at finnaly sums all numbers in the range.
so in my worksheet i just have to put =getposition(range) and the cell
display the correct sum result.
my problem is, i can't color the 4 higher values, that i stored the position
in my array(position).
for for an example imagine that "position" array is with the values
("","A5",A9","A10","A15")
******************************************
Function getposition(colunas) As Integer
Dim a As Range, c As Range
position = Array("","", "", "", "", "")
.....
.....
.....
.....
calcula = total
******will color the ranges /don't work
for i=1 to 4
Range(position(i)).Select
Selection.Font.ColorIndex = 5
Selection.Font.Bold = True
next
End Function
**************************
any ideas?
i can't select the cell even color them.
Thanks in advance
i have a function "getposition(range)" that get the position of the 4 higher
values in that range and at finnaly sums all numbers in the range.
so in my worksheet i just have to put =getposition(range) and the cell
display the correct sum result.
my problem is, i can't color the 4 higher values, that i stored the position
in my array(position).
for for an example imagine that "position" array is with the values
("","A5",A9","A10","A15")
******************************************
Function getposition(colunas) As Integer
Dim a As Range, c As Range
position = Array("","", "", "", "", "")
.....
.....
.....
.....
calcula = total
******will color the ranges /don't work
for i=1 to 4
Range(position(i)).Select
Selection.Font.ColorIndex = 5
Selection.Font.Bold = True
next
End Function
**************************
any ideas?
i can't select the cell even color them.
Thanks in advance