+ Reply to Thread
Results 1 to 12 of 12

Range entering with set DIM

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Range entering with set DIM

    Hi folks

    I have the following code...

    Please Login or Register  to view this content.
    I've set the rRange values as i dont want to keep typing it in, as there are a few checkboxes to go through. however when the code runs it overtypes everything in the first row.

    I thought using the END(XLUP).OFFSET part would do what it normally does, but the range set seems to be ignoring this.

    Any ideas???

    Thanks
    Cry Havoc, let loose the Dogs of War

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,289

    Re: Range entering with set DIM

    Do you have a Table on the worksheet?
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Range entering with set DIM

    I think you want to use something more like this:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Range entering with set DIM

    ROMPERSTOMPER - there is an empty table in the worksheet that i'm trying to enter the information into.

    WALRUSEGGMAN - That code unfortunately didnt work

    Thanks

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,289

    Re: Range entering with set DIM

    How big is the table? Using End(xlUp) behaves differently with tables. Ideally your table should only have one blank row for entering data and you then add rows to it as needed.

  6. #6
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Range entering with set DIM

    Sorry Romper - its not a table, just a standard worksheet!

  7. #7
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Range entering with set DIM

    Just to be clear, you're trying to rRange1 to the first empty cell in column E?

  8. #8
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Range entering with set DIM

    That's right

    The first empty cell is E7, then the next results need to go E8, E9, E10 etc.

  9. #9
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Range entering with set DIM

    What exactly do you mean by
    the code runs it overtypes everything in the first row
    ? What is being 'overtyped'?

  10. #10
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Range entering with set DIM

    So...

    I have two checkboxes in the userform (there will be more!) and when both are ticked i want two lots of information to be input...

    E F
    row1 = Input1 Input2
    row2 = Input3 Input4

    Instead of putting 'input3' and 'input4' into row2 its 'overtyping' it into row1, over the information thats already there.

    Hope that makes sense?

    thanks

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Range entering with set DIM

    You need to recalculate rRange1 and rRange2 each time you add data to the worksheet.
    If posting code please use code tags, see here.

  12. #12
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Range entering with set DIM

    You're not redefining rrange1 and 2 between checkboxes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sum data by entering a date range
    By EmilyB in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-02-2014, 10:38 PM
  2. Entering Sum and Range Formula in Macro
    By goldenbear10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2009, 04:24 PM
  3. Entering combo box value into the source range
    By kiwi_flyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-27-2009, 03:46 AM
  4. entering a formula after a random range
    By dgwak in forum Excel General
    Replies: 4
    Last Post: 12-17-2008, 12:18 PM
  5. [SOLVED] Entering a range of numbers and searching same
    By Penny in forum Excel General
    Replies: 29
    Last Post: 05-10-2006, 10:45 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1