+ Reply to Thread
Results 1 to 9 of 9

how to select rows

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    how to select rows

    Hi!

    the problem is the following
    sh = range("J1")
    Shift = (sh * 12) + 1
    s = Str(Shift)
    s2 = Str(Shift + 12)
    s = s + ":" + s2 <- the problem lies perhaps here. How can you place a quotation mark (") around the string s
    Rows(s).Select <- this does not work without thous quotation marks, one would need for ex. "1:6" instead of 1:6
    thank you in advance for your help

    Kind regards
    keymuu

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: how to select rows

    Try this..
    s = s & ":" & s2
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: how to select rows

    Hello!

    Thank you but
    sorry to say Vikas_Gautam but
    that produces run-time error 13, type mismatch,
    so its stops to the same place "Rows(s).Select "

    Maybe one should do the string s in a other way, I just don't know how?

    reagards
    keymuu

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,710

    Re: how to select rows

    Perhaps this will work better?

    Please Login or Register  to view this content.
    Alf

  5. #5
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: how to select rows

    Thank you Alf ! Tack Alf !

    that works just as it should

    Thank you again

    regards
    Key

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,710

    Re: how to select rows

    You are welcome, thanks for feedback!

    Alf

    Ps Don't forget to mark thread "Solved"

    To mark your thread solved do the following:
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

  7. #7
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: how to select rows

    Hi again!

    Where do I find the solved button? It is quit a long time when I was here the previous time!
    I will then press it

    keymuu

  8. #8
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,710

    Re: how to select rows

    No button. Click on "Thread Tools" in your first post (top right 3th heading). The drop-down shows a number of possible choices.

    Click on "Mark thread as Solved" and that should fix it.

    Alf

  9. #9
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: how to select rows

    Thank you Alf for ALL your help

+ 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. Replies: 4
    Last Post: 11-13-2013, 11:15 AM
  2. Code to prevent user to Select COLUMNS but allow to select ROWS
    By tengrosita in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2011, 03:46 AM
  3. Replies: 1
    Last Post: 04-23-2007, 04:23 PM
  4. [SOLVED] Macro to select 4 entire rows and then delete rows
    By Scott Viney in forum Excel General
    Replies: 3
    Last Post: 09-22-2005, 03:05 PM
  5. [SOLVED] select block of rows w/data between blank rows
    By Janna in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2005, 11:06 PM

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