+ Reply to Thread
Results 1 to 5 of 5

Extract the current row number when the whole row is selected

  1. #1
    Registered User
    Join Date
    06-25-2009
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    3

    Extract the current row number when the whole row is selected

    I know I'm going to smack my forehead when someone points out how easy it is, but essentially, I'm looking for the opposite of this:

    Please Login or Register  to view this content.
    Here, when a cell is selected, I use this to get the number of the row that it is in. As you can see below, this code searches for a particular field, then deletes that whole row and adds 2 blank rows in it's place. I end up with a row selected and want to get that row number, go to cell(currentrownumber, "F") and do an autosum. But I can't find the specific function to do this. Any help please? VERY much appreciated.

    Please Login or Register  to view this content.
    [/QUOTE]

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Extract the current row number when the whole row is selected

    What are you using the SendKeys for?

    I think you can do away with a lot of your Selecting. You want to select the F column cell of the topmost blank row that you have just inserted, correct?

    Please Login or Register  to view this content.
    Richard Schollar
    Microsoft MVP - Excel

  3. #3
    Registered User
    Join Date
    06-25-2009
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Extract the current row number when the whole row is selected

    The sendkeys is for the auto sum function to work as if I were hitting the button. It will guess the data to sum based on the grouping and hit enter. I got that from the microsoft site somewhere I think..

    and yes exactly, that's what I'm trying to do, but your code didn't work. It broke on
    Please Login or Register  to view this content.
    and said "error 1004 Application-defined or object-defined error." Any other ideas?

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Extract the current row number when the whole row is selected

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

  5. #5
    Registered User
    Join Date
    06-25-2009
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Extract the current row number when the whole row is selected

    In my haste to get ideas I forgot to do that, this post is now linked over there as well as that forums' post here: http://www.mrexcel.com/forum/showthread.php?t=398874

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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