Hi everyone,
I am trying to set up a logic to identify the trends that should be copied into a different workbook.
So far, I can identify where the trend is, but I am not able to set up the range, probably due to a variable definition.
My attempt is to find the name I want (cll1) in w/s "ACCLIQ_T_Input". Select the cell which is 2 rows bellow and 1 column to the left (cll3)
Then the range to be selected for copying in another workbook will be from cll3, to cll3+1 (2 columns) and to the last row of the trend (dynamic).
This is my attempt so far... but I cannot set the range from what I have at the moment.
Any help will be much appreciated...
This is part of a loop, hence the name Sheets(Sheets.Count)
Thanks very much!
I am trying to set up a logic to identify the trends that should be copied into a different workbook.
So far, I can identify where the trend is, but I am not able to set up the range, probably due to a variable definition.
My attempt is to find the name I want (cll1) in w/s "ACCLIQ_T_Input". Select the cell which is 2 rows bellow and 1 column to the left (cll3)
Then the range to be selected for copying in another workbook will be from cll3, to cll3+1 (2 columns) and to the last row of the trend (dynamic).
This is my attempt so far... but I cannot set the range from what I have at the moment.
Any help will be much appreciated...
Code:
Dim cll1 As Range
Dim cll3 As Integer
Dim fnd1 As String
Set TC = Sheets("ACCLIQ_T_Input").Rows(1)
Set cll1 = Sheets(Sheets.Count).Cells(2, 2)
fnd1 = TC.Find(cll1)
cll3 = Sheets("ACCLIQ_T_Input").Range(Sheets("ACCLIQ_T_Input").Cells(1, 1), Sheets("ACCLIQ_T_Input").Cells(2, Columns.Count).End(xlToRight)).Find(fnd1).Offset(2, -1)
This is part of a loop, hence the name Sheets(Sheets.Count)
Thanks very much!