Hi there everyone,
[I apologise for the length of this post, It's my first time posting and I wanted to be descriptive so it would be easier to understand the problem]
For the past few months when I've had spare time I have been working on a userform project, and have always appreciated the help of other users on forums such as these. It has finally come to a time where I must post for help since I am stuck and unsure how to proceed.
Simply put, I have some code that inserts a table into your spreadsheet.
Usually, it always inserts a table from a set cell (A15) and the no. rows down it goes depends on the value of a textbox. Here it is below:
It is very important that the table created equals the number in the textbox (as this is the number of samples)Please Login or Register to view this content.
So for example, if the textbox has a value of 5 (5 samples need to be in the table), so the range will be from A5:15, the "+15" is there to give the correct table size, so the final range will be A15:A20 (thus the sample size of 5 is made as per the textbox)
I also want to add a feature whereby a user can choose wherever they would like to place the table (ie: free movement), however I keep getting a weird issue. This is what code I'm using:
I should note that:Please Login or Register to view this content.
Textbox 16 is for the letter reference (ie: G)
Textbox 17 is the number part (ie: 5)
so both these form a full cell (ie: G5)
Lets assume TextBox3 is 4 - so 4 for the sample size
The above code I thought would work like this:
Range = G + 5 (G5) : G + 3 (G3) + 5
Therefore making the final range G5:G8 (which is how I need it to be, as the user specifies to insert the table from G5, then the 3 samples take it to G8
However, when I execute this code, it doesn't add up as a number: instead of doing G3 + 5 = G8 as I thought it would, it does G35
So it makes a table G5:G35 instead of G5:G8
Can anyone assist me with fixing this so it computes correctly as I would like it to?
I appreciate any replies and help, and I would like to apologise for the length of this post (It's my first post so getting use to it!)
All the best,
Nathan
Bookmarks