LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Duplicate last row and other progressive numbers

Hallo to everybody.
I found in Internet the following Vba code that works Ok, but I would like to modify as follows if possible as I am not very good with VBA
- instead of copy range A23:J23, and insert after the last row, copy Alastrow:Jlastrow and insert in the below row (for example from 25 to 26; then from 26 to 27, etc.
- in the cell D add a progressive number: if for example row 25, Cell D has 11, when copied to to row 26, cell D should have 12 and so on; when copied of row 27, cell D=13

Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim NextCell As Range
Dim LastRow As Integer

Set WB = ActiveWorkbook
Set SH = WB.Sheets("UK")
Set rng = SH.Range("A23:J23")

Set NextCell = SH.Cells(Rows.Count, "A").End(xlUp)(2)

rng.Copy Destination:=NextCell

End Sub

I hope I have been able to explain what I would like to have.
Thanks for your much appreciate help.
Regards
John



--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do not want duplicate numbers. lluvia Excel Discussion (Misc queries) 1 February 20th 08 06:56 PM
progressive sum balu Excel Discussion (Misc queries) 3 November 18th 07 06:12 PM
Duplicate numbers kbkst via OfficeKB.com New Users to Excel 8 February 22nd 06 06:57 PM
duplicate numbers Pam Coleman Excel Discussion (Misc queries) 1 October 11th 05 09:21 PM
no duplicate numbers Neuther Excel Discussion (Misc queries) 1 October 8th 05 04:29 AM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"