Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
i have a excell for with data entered in and need to enter new da. | Excel Worksheet Functions | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions | |||
ENTER DATA EXCELL SO RELATED DATA APPEARS | Excel Worksheet Functions | |||
Using forms to enter Data into an Expense Sheet. | Excel Discussion (Misc queries) | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions |