Hi All....
I am having Three Ranges in a worksheet, "B4:B14", "E4:E14", "F4:F14"
All the cells in the range "F4:F14" has formulae,
The Values of these ranges have to be copied in the Columns "B", "D" and "E" respectively
ie Values of Range "B4:B14" has to be copied in the last available cell (Row) in column "B"
Values of Range "E4:E14" has to be copied in the last available cell (Row) in column "D"
Values of Range "F4:F14" has to be copied in the last available cell (Row) in column "E"
The below code i am using does the work well, It copies the first two ranges "B4:B14", "E4:E14" correctly everytime without any error,
but the Range "F4:F14" is where the problem comes.....most of the time it copies the values, but with a gap of a few cell (Rows) in between,
please note the cells in this range has formulae.
I have tried various codes, but the error occurs
I am having Three Ranges in a worksheet, "B4:B14", "E4:E14", "F4:F14"
All the cells in the range "F4:F14" has formulae,
The Values of these ranges have to be copied in the Columns "B", "D" and "E" respectively
ie Values of Range "B4:B14" has to be copied in the last available cell (Row) in column "B"
Values of Range "E4:E14" has to be copied in the last available cell (Row) in column "D"
Values of Range "F4:F14" has to be copied in the last available cell (Row) in column "E"
The below code i am using does the work well, It copies the first two ranges "B4:B14", "E4:E14" correctly everytime without any error,
but the Range "F4:F14" is where the problem comes.....most of the time it copies the values, but with a gap of a few cell (Rows) in between,
please note the cells in this range has formulae.
VBA Code:
Sheet1.Range("B4:B14").Copy
Sheet1.Range("B" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlValues
Selection.Value = Selection.Value
Sheet1.Range("E4:E14").Copy
Sheet1.Range("D" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlValues
Selection.Value = Selection.Value
Sheet1.Range("F4:F14").Copy
Sheet1.Range("E" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlValues
Selection.Value = Selection.Value
Application.CutCopyMode = False
I have tried various codes, but the error occurs
SCM Current-Dist-3ScreenCopy.xlsm | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
184 | 11:47 | KFSTM650B | BOX KFSTM650 | 1 | 1995 | ||
185 | 11:47 | LPS650B | BOX LPS650 | 1 | |||
186 | 11:47 | LPM650B | BOX LPM650 | 1 | |||
187 | 11:47 | LPM330B | BOX LPM330 | 1 | |||
188 | 11:47 | KFS650B | BOX KFS650 | 2 | |||
189 | 11:47 | KFM650B | BOX KFM650 | 1 | |||
190 | 11:47 | KFS330B | BOX KFS330 | 1 | |||
191 | |||||||
192 | |||||||
193 | |||||||
194 | |||||||
195 | 1600 | ||||||
196 | 1460 | ||||||
197 | 1824 | ||||||
198 | 3876 | ||||||
199 | 1938 | ||||||
200 | 2234.4 | ||||||
201 | |||||||
04-18-2021 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A184:A201 | A184 | =TIMESTAMP(B184) |
C184:C201 | C184 | =IFERROR(VLOOKUP(B184,$M$1:$Q$6000,2,FALSE),"") |