Calculations in VBA
see if this will work for you
Option Explicit
Dim r1 As Range
Dim r2 As Range
Dim cell As Range
Sub test2()
Set r1 = Range("data_cells")
Set r2 = Range("p15")
r1.Select
For Each cell In Range("data_cells")
cell.Value = cell.Value / r2
Next
End Sub
--
Gary
"Murtaza" <NoEmail@NoEmail wrote in message
...
I have a Named Range called "Data_Cells"
[='Sheet1'!$F$20:$L$31,'Sheet1'!$N$20:$O$31,'Sheet1 '!$O$42:$O$44)]
Now I wish to divide each cell in "Data_Cells" with the value in "P15"
using VBA like...
For Each cell in "Data_Cells"
Data_Cells.value/P15
Exit for
Please help
|