josuemugna
New Member
- Joined
- May 1, 2019
- Messages
- 1
Hy my friends this is the situation, i have to consolidate data of two colums of the previous sheet, staring from h2:i2 to the last cell with data. I have recored this code that works but i don´t know how to change the range to the dynamic that range i mentioned before because i need to aply this to different sheets and the range is not always the same. Please help me.
Range("H1").Select
Selection.Consolidate Sources:= _
"'prueba'!R2C8:R69C9" _
, Function:=xlSum, TopRow:=False, LeftColumn:=True, CreateLinks:=False
Range("H1").Select
Selection.Consolidate Sources:= _
"'prueba'!R2C8:R69C9" _
, Function:=xlSum, TopRow:=False, LeftColumn:=True, CreateLinks:=False