+ Reply to Thread
Results 1 to 9 of 9

Current region question when "what appears" is a blank row in row 1

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

    Current region question when "what appears" is a blank row in row 1

    Hi,

    I am enclosing an excel file to hopefully fill in the blanks where my question is deficient.

    I am trying to determine the "top row" of a group of data in a file. See enclosed file.


    The way i do this is i determine the "farthest" right column with data in it. I then find the corresponding row.........then i use the "current region" property given that row and column.

    For the most part this has worked..........until today and i dont know why.........i know its the input file....but not sure why. Can somone help?

    Sheet 1 is representative of my input file. Row 1 apepars to be empty but i dont think it is............any thoughts?
    Attached Files Attached Files

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

    Re: Current region question when "what appears" is a blank row in row 1

    Why is row 1 included in the current region value...........does not make sense to me?

    any one know?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Current region question when "what appears" is a blank row in row 1

    U1 contains a null string, If you select row 1 and press delete, row 1 is no longer part of the current region of A1.
    Entia non sunt multiplicanda sine necessitate

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

    Re: Current region question when "what appears" is a blank row in row 1

    shg,


    I found this defn of current regions:
    The CurrentRegion is a range of cells
    bounded by empty rows and empty columns,



    So i guess nullstrings are not the same as "empty" cells.

    Is there a way to find the "region" of data of interest?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Current region question when "what appears" is a blank row in row 1

    Select a cell and press Ctrl+A

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Current region question when "what appears" is a blank row in row 1

    Just to add to Shg,

    Why don't you use this code if all you are looking for is the row number of the cell in question?

    Please Login or Register  to view this content.
    What you have now.
    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

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

    Re: Current region question when "what appears" is a blank row in row 1

    shg.........yes pressing cntrl + A is same kind of thing as using "current.region" in vba............thanks.

    but is there a way to determine "region" which does not include the nullstring?

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

    Re: Current region question when "what appears" is a blank row in row 1

    i cant use that ...cont remember why exactly but i seem to recall that if the last column of data is not uniform and that its say row 44 through 46 which has data in the last column only.......then this would not work.

    thanks guys.....

  9. #9
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Current region question when "what appears" is a blank row in row 1

    Try this file. This shows row 2.
    Attached Files Attached Files

+ 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