Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Silly I know

Rather than have 500+ rows that are identical. I thought that a little
VBA script might, as I input data into the next to last row,
automatically copy the last row and add it to the next empty cell/row.

That way it would always be one step ahead of me. This would keep the
workbook to a size that is only as big as it needs to be.

Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Silly I know

I don't understand. What are you trying to do? - Piku

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Silly I know

I am developing a payroll sheet at work. It uses some vlookups for the
employee database as well as the hourly amounts. Each row represents one
employee for that day. The columns include SS#, base rate, O.T, D.T.,etc
and a bunch of others. It also does the calculations and sums at he the
end of each row for that employee.

To make a file that is good for an average week, I may need up to 500
repetitions of this single row. This however makes the file rather large
and some weeks I may not come close to needing that many rows.

To that end I was trying to think of a way that it would auto-copy/paste
additional rows as I near the end.

That way I could have, say 10 rows in the file to begin with and let it
expand according to the needs of that week.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Silly I know

Here is one way

Sub newline()
If [e4] < 0 Then [e4] = 0
Cells([checksA].Rows.Count + 7, 1).Select
With ActiveCell
..Offset(0) = .Offset(-1)
..Offset(0, 4) = 1
End With
End Sub

Here's another

Sub newline()
r = Range("b65536").End(xlUp).Row
Range("a" & r & ":h" & r).AutoFill Destination:=Range("a" & r & ":h" & r +
1), Type:=xlFillFormats
Range("e" & r).Copy Range("e" & r + 1)
Range("e" & r + 1) = ""
Range("b" & r + 1) = Date
Range("b" & r + 1).Select
End Sub

--
Don Guillett
SalesAid Software

"Terry Klein" wrote in message
om...
Rather than have 500+ rows that are identical. I thought that a little
VBA script might, as I input data into the next to last row,
automatically copy the last row and add it to the next empty cell/row.

That way it would always be one step ahead of me. This would keep the
workbook to a size that is only as big as it needs to be.

Is this possible?



Reply
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
Silly question Darrell_Sarrasin via OfficeKB.com Excel Worksheet Functions 6 May 11th 07 01:08 PM
Silly question about using dates Zerosumgame Excel Discussion (Misc queries) 5 April 1st 06 03:37 AM
This is so silly... jsc3489 Excel Worksheet Functions 3 November 10th 05 02:06 PM
Silly little annoyance Setting up and Configuration of Excel 6 December 22nd 04 09:33 PM
Silly Question Mick Southam Excel Programming 4 January 6th 04 09:32 PM


All times are GMT +1. The time now is 05:56 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"