+ Reply to Thread
Results 1 to 9 of 9

Range Question

  1. #1
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Range Question

    I have a Range E9:E17 that I would like to look at one cell at a time. I figured I would use this code to do that. My first question is how would I put the value of each of those cells into something like Part I have below without a mismatch?
    Second Question how do I handle it if someone adds a row to the spreadsheet?


    Please Login or Register  to view this content.
    Last edited by JosephP; 10-23-2012 at 05:11 PM. Reason: correct tag

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Range Question

    if you don't know what data type the cells will contain you can declare Part as variant

    for part two you should use a named range instead of fixed cell addresses
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Range Question

    Please Login or Register  to view this content.
    Last edited by AB33; 10-23-2012 at 05:18 PM.

  4. #4
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: Range Question

    Well if it isnt my favorite moderator. Unfortuanately this is an existing spreadsheet that has been in use for years and the code needs to work with old saved versions so I cant name the range. I would love to it would make my life way more easy.

  5. #5
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: Range Question

    AB33 I've got some questions. This code is a little further than I am. What is the (xlup) for? How dose it know when it reached the last cell?

  6. #6
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: Range Question

    Ok I see the .end now so My only question would be the (xlup)

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Range Question

    You could use as an option for LR

    Please Login or Register  to view this content.
    'This is will only look for used range.
    (xlup) is going up from the last row up E9. You could also use (xldown) if you wish to go down from E9 to last row

  8. #8
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: Range Question

    Thanks I love learning this stuff and it seems like there is so much to learn.

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Range Question

    I am still learning and get better and better every day. Please close this thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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