Dancul
03-26-2019, 01:21 AM
Hello
I'm a bit stuck with find range from text and then make calculation with range ... What I mean
I need to find make some calculation. But I need to find start cell and end cell.
So my code looks:
Sub Vat()
Dim rng As Range, cell As Range
'Find text
DPHrange = Cells.Find("celkem s DPH").Offset(1, 0).Address
DPHrange2 = ActiveSheet.Range("F32").End(xlDown).Address
' It looks I'm stuck here> how can I set rnd to have range in rng
Set rng = Range(DPHrange, DPHrange2)
'The resto code is calculation
For Each cell In rng
Next cell
cell.Value = cell.Value * 1.21
I'm a bit stuck with find range from text and then make calculation with range ... What I mean
I need to find make some calculation. But I need to find start cell and end cell.
So my code looks:
Sub Vat()
Dim rng As Range, cell As Range
'Find text
DPHrange = Cells.Find("celkem s DPH").Offset(1, 0).Address
DPHrange2 = ActiveSheet.Range("F32").End(xlDown).Address
' It looks I'm stuck here> how can I set rnd to have range in rng
Set rng = Range(DPHrange, DPHrange2)
'The resto code is calculation
For Each cell In rng
Next cell
cell.Value = cell.Value * 1.21