Help with multi page form

HDfatboy03

Board Regular
Joined
May 23, 2010
Messages
62
Hello

I am creating a multi page form, I'm on the 2nd page and I believe it will end up being a 3 page form. The opportunity that I have is that the 1st form, the information is being transferred to a sheet named AppDB in columns 1 thru 12. The second form (a continuation of the first form) information should be transferred to columns 13 - 37 (in the same row as columns 1 thru 12). Everything is going to the correct column but the second form is starting a new row. I know the opportunity lies in this statement but I don't know how to fix it. Any suggestions.

<CODE>

'find first empty row in database
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

<CODE END>

thanks in advance for any assistance

HDfatboy03
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
The bit you posted is telling it to assign iRow by finding the last row containing data in column A and offsetting down one row.
If you want your data from page 2 to start in the same row as the data from page 1 there are a few ways to determine the row of interest.
Let's assume there will (always) be the same number of rows worth of data from page 2 as from page 1.
Then you could amend the line:
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

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


This will find the last row of column 13 to start laying out the data from page 2.

Hope it helps.
 
Upvote 0
My output in the worksheet looks like this

A B C D E
2 Date Name Company Start Date Cell #
3 07/10/2010 Tom Jones Heavy Equip
4 08/01/2010 513-231-3231

And I want it to look like this

A B C D E
2 Date Name Company Start Date Cell #
3 07/10/2010 Tom Jones Heavy Equip 08/01/2010 513-231-3231

I know its something simple but I can't figure it out

Thanks

HDfatboy03
 
Upvote 0
I'm only seeing 5 columns of data there. (Not 12 as mentioned earlier.)
If your form's first page puts the data - 07/10/2010 | Tom | Jones Heavy Equip in columns A:C, and you want the second page to start in column D the same row, then how about something like:
Code:
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
for the first page and:
Code:
iRow = ws.Cells(Rows.Count, 3).End(xlUp).Offset(, 1).Row
for the second page.

That help?
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top