Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Enter data in next available row

I'm not sure...

dim iRowUse as long
Dim iRowA as long
dim iRowD as long

with ws
irowa = .cells(.rows.count,"A").end(xlup).row + 1
irowD = .cells(.rows.count,"D").end(xlup).row + 1
end with

if irowa irowd then
irowuse = irowa
else
irowuse = irowd
end if

'then use irowuse in your formulas.

Or if you want to loop through all the columns...

dim iCol as long
dim iRow as long
dim cRow as long 'current column's last row

irow = 0
for icol = 1 to 6 'A to F
crow = .cells(.rows.count,icol).row
if crow irow then
irow = crow
end if
next icol

'come down one row
irow = irow + 1

......

michaelberrier wrote:

Dave,
Is there a way to adapt Debra's code :

iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

to allow data to be entered into the same row in a different column if
that interesection is empty. For example, if you maintain two
databases on the same sheet, one in Col A-C and the next in Col D-F. I
tried setting a seperate Dim and using a greater offset, but it didn't
do what I was hoping.

Thanks.

Dave Peterson wrote:
Take a look at how Debra Dalgleish approached it:
http://www.contextures.com/xlUserForm01.html

michaelberrier wrote:

What is the syntax for putting text entered in a userform(or cell or
whatever) into the next available row in a sheet, so that it forms a
database of sorts?

Thanks to all.


--

Dave Peterson


--

Dave Peterson
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
i have a excell for with data entered in and need to enter new da. c tech Excel Worksheet Functions 0 April 10th 06 03:08 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
ENTER DATA EXCELL SO RELATED DATA APPEARS VICKIO66 Excel Worksheet Functions 2 August 23rd 05 01:16 AM
Using forms to enter Data into an Expense Sheet. RayJ Excel Discussion (Misc queries) 1 July 5th 05 12:58 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 02:11 PM.

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"