ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy a result (https://www.excelbanter.com/excel-programming/380607-re-copy-result.html)

Ken Johnson

copy a result
 

Zaahir wrote:
hi

Range("c1").Select
Selection.CurrentRegion.Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "=R[-1]C+1"

i use the above code to generate the next entry number............
the above works fine but i need i need to copy the result to a different
cell but when executing the copy and paste code it paste an error msg...

how can i mod the code so that i actually paste the value and not the error
msg?

thanx in advance!!!!


You don't say where you're pasting to, so I'll say Range("G1")...

Range("c1").Select
Selection.CurrentRegion.Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "=R[-1]C+1"
Range("G1").Value = ActiveCell.Value

Ken Johnson



All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com