+ Reply to Thread
Results 1 to 5 of 5

Finging first row of a given column that has data in it.......exclude header

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Finging first row of a given column that has data in it.......exclude header

    I have this code and it works to find the first row of data in colB where it excludes the header row.


    Please Login or Register  to view this content.

    However, when i try to make the code more flexible by makeing B1 a variable .....i get a type mismatch........see below

    Please Login or Register  to view this content.



    I am enclosing an excel file as this usually makes things easier.
    Attached Files Attached Files
    Last edited by welchs101; 07-14-2011 at 02:23 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Finging first row of a given column that has data in it.......exclude header

    Hi welchs101, I had troubles with this line
    Please Login or Register  to view this content.
    and I think it is because of alphacol. You have to declare alphacol as a range and then set it to B1 first. Let me know if the following does what you want
    Please Login or Register  to view this content.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Finging first row of a given column that has data in it.......exclude header

    Yes, that worked perfectly.

    But how did you know to convert it to a range.

    How did you know what the cells.find format needed?

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Finging first row of a given column that has data in it.......exclude header

    I knew that because After:= means after a range/cell (at least that's what I thought it meant).

  5. #5
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Finging first row of a given column that has data in it.......exclude header

    good enough for me.....thanks.

+ 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