Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2004, 01:34 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Autofill in unknown number of rows

Hi!

i can have any number of rows in Sheet 1. There are four cols in the data: A,B,C and D.

1) First, i want to find out how many data rows exist. Please note, i do not want to use UsedRange, as it is misleading.

2) Second, there is a date function in D1. I want to autofill this function in all the rows that contain data.

how shud i do this?
Thanks for ur help!

regards
ashu


 
Old August 8th, 2004, 09:58 PM
Authorized User
 
Join Date: Feb 2004
Location: , , Denmark.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default


 1. put this in your code
Lastrow = Sheet1.Cells.Find("*", Range("A1"), xlFormulas, , _
             xlByRows, xlPrevious).Row

2. Do you want the same date in all cells? Or do you want to fill the actual
date in the last row when you add more data?
Cheers
Karsten



 
Old August 9th, 2004, 06:09 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for ur response. My prob has been solved. :)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Number of table rows to a variable Paula222 Access VBA 2 February 7th, 2006 09:33 AM
disoplaying number of rows. ashokparchuri ADO.NET 2 April 21st, 2005 04:28 AM
total number of rows in a recordset lian_a Classic ASP Basics 2 February 8th, 2005 08:13 AM
Storing a unknown number of strings to an Array PanzarPaw Classic ASP Basics 4 November 21st, 2003 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.