jerryr0125
05-31-2017, 05:42 PM
hi -
I am looking for a way to do the following :
- Analyze row 1 in a spreadsheet
- Determine the number of columns (the last column)
- copy a particular formula from cell AG2 to the last column as calculated (say AZ) in row 2.
I know I have to use something like the following, but in my formula how do I state to copy AG2 to lastcolumn row 2 ?
thanks - jerryr
Dim lCol As Long
lCol = Cells(1, Columns.Count).End(xlToLeft).Column
I am looking for a way to do the following :
- Analyze row 1 in a spreadsheet
- Determine the number of columns (the last column)
- copy a particular formula from cell AG2 to the last column as calculated (say AZ) in row 2.
I know I have to use something like the following, but in my formula how do I state to copy AG2 to lastcolumn row 2 ?
thanks - jerryr
Dim lCol As Long
lCol = Cells(1, Columns.Count).End(xlToLeft).Column