![]() |
Entering Userform data to worksheet
Hi Guys,
I have a user form that I am hoping will simplify data entry onto a large wooksheet. The user form logs growth measurements. Individual measurements will always be entered onto the worksheet in the same row (i.e. weight = r12, height = r22, sitting height = r23). There are various calculations inbetween data points in the column so data is not always logged in consecutive rows. However, the column that they need to go into depends on the number of times they have been seen. For example if it was their first assessment the worksheet column the data needs to go into would be N, 2nd visit O, 3rd visit P and so on. So I have a textbox in the Userform to log visit number. This data does not need to be entered on the worksheet, but I was hoping that it could be used to define the column offset somehow. Can anyone help me out with wiring some code for a userform to get round this? I am really struggling! Many thanks in advance |
Entering Userform data to worksheet
To write to cells you can either use Range("A1") or cells(RowNumber,
ColumnNumber). You probably need cells(23, VisitNumber + 2). You may or may not need the PLUS value. Or you could do this to find last column in row 1 (or any row) LastCol = Cells(1,columns.Count).end(xltoleft).Column Cells(23,LastCol) = Data " wrote: Hi Guys, I have a user form that I am hoping will simplify data entry onto a large wooksheet. The user form logs growth measurements. Individual measurements will always be entered onto the worksheet in the same row (i.e. weight = r12, height = r22, sitting height = r23). There are various calculations inbetween data points in the column so data is not always logged in consecutive rows. However, the column that they need to go into depends on the number of times they have been seen. For example if it was their first assessment the worksheet column the data needs to go into would be N, 2nd visit O, 3rd visit P and so on. So I have a textbox in the Userform to log visit number. This data does not need to be entered on the worksheet, but I was hoping that it could be used to define the column offset somehow. Can anyone help me out with wiring some code for a userform to get round this? I am really struggling! Many thanks in advance |
Entering Userform data to worksheet
Perfect! the cells() function works a dream!!
Thanks so much for your guidance Joel |
All times are GMT +1. The time now is 10:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com