+ Reply to Thread
Results 1 to 6 of 6

Finding next available row issue

  1. #1
    Registered User
    Join Date
    02-15-2016
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    2

    Finding next available row issue

    Hello everyone, I am a brand new noobie here, I need assistance with something I am working on;

    iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1

    I need this to ignore a certain row (row G). My issue is that this macros detects formulas (or the result of the formula which is 0 since no info is input yet) however it goes to the next available row which has no formula.

    Unless there is an easier way can anyone assist me with adjusting this macros to skip Row G when searching for the next available row?

    -Richard

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Finding next available row issue

    Hi Richard, and welcome to the forum.

    What exactly is it you're trying to do? Find the last row/column? Bit confused on this because you say row, but then talk about G, which would traditionally be a column.

    Perhaps posting a sample workbook with the row/column you're trying to locate highlighted would be of help in producing a swift solution.

    BSB

  3. #3
    Registered User
    Join Date
    02-15-2016
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    2

    Re: Finding next available row issue

    Sorry I do apologize for the confusion I didn't have enough coffee yet. This is what I have right now. It works fine however I input =SUMIF(A:A, A6, F:F) on column G the macros detects the formula and skips all the way down until it cannot detect a formula any more on Column G, is there any way to avoid this?
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 02-16-2016 at 03:05 PM.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Finding next available row issue

    Hi Richard,

    Normally the next available row is the one on the bottom of the whole sheet (in a specific column). The VBA for finding this is as follows.

    Dim LastRow as Double
    LastRow = ws.Cells(Rows.Count,"A").End(xlUp).Row

    Note - Rows.Count is a number. It is the bottom row (do Control Down Arrow lots of times). Early Excel had less rows than the newer versions of Excel.
    Note - the "A' in the formula above tells excel to go to that column. Sometimes there are blanks (at the bottom of the A column so you want B or C..)

    You might then want to get to the row below the last one and that would be something like:

    Cells(LastRow +1,"F").Select ' to get to the first blank row (using A column) and set the cursor in that row in the F column.

    I hope that helps.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Finding next available row issue

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Finding next available row issue

    Hi Richard,

    To follow your code and logic correctly I need a sample workbook and the code in it. You should explain what is happening and what you expect the code to do for you.

    To attach a sample workbook, Click on Go Advanced and then on the Paper Clip Icon above the advanced message area.

+ 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. Issue finding out weighted average for zip code list
    By itobon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-18-2015, 04:06 PM
  2. Issue Finding last row to send mass emails
    By MikeSta4ord in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2015, 03:00 PM
  3. [SOLVED] Issue finding an average
    By The Man With No Name in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-08-2014, 02:47 PM
  4. Finding last non-zero and manipulating value - issue with formulas
    By jperlin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-29-2014, 08:18 PM
  5. [SOLVED] issue finding a date in vlookup
    By Araise in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-17-2013, 07:17 PM
  6. Query Issue for finding Max Value per Bag
    By Snoopy2003 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-16-2012, 11:56 AM
  7. Issue with finding data source using CurDir
    By Arsi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2011, 03:15 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