+ Reply to Thread
Results 1 to 4 of 4

formuls not searching first row in caculation using Last Row

  1. #1
    Forum Contributor
    Join Date
    06-06-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2013
    Posts
    129

    formuls not searching first row in caculation using Last Row

    I have found that a formula I have been using is not searching the first entry using the Last Row formula and I can't figure out why this is happening. I also found that the formula is counting more rows than are actually being used. The last row is actually row 10 and it is showing row 37.

    The formula is to count the number of different labels in column K and put them into the appropriate column in the persons ID row. The formula works but it will not count anything in the first row to be counted Row 5. In the example there are 6 entries and the last row is showing the last row as 37 when it is 10 so I seem to have two problems (Last Row Count wrong) and (not searching the first row in range row 5). I didn't write the search code and can't figure out where the problem is. I have put remarks in as to what I think the code is doing but I am not sure if I am right.

    I have attached a sample workbook with the code. To run the search select the EOD #1 button. The results will appear in columns AO5, AP5 and AO6, AP6. The total of the entries should be 6 entries but it will only show 5.

    Here is my search code:
    Please Login or Register  to view this content.
    Any and all help is greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: formuls not searching first row in caculation using Last Row

    1. Row 37 has data in it. Is the table a fixed length? IF so, then LastRow = Rows("1:22").Find... would do the trick to give you a result of 10
    2. Autofilter code should include the header row (4)

    Please Login or Register  to view this content.
    Last edited by Arkadi; 07-09-2019 at 02:49 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Contributor
    Join Date
    06-06-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2013
    Posts
    129

    Re: formuls not searching first row in caculation using Last Row

    Yes it does. I didn't realize that the search was checking the entire sheet (the light it now on!). You are the man!! I made these changes and it works perfectly now. Thank you so much!

    Changed from:
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.
    And from:
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.
    Again thank you for your help and instruction.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: formuls not searching first row in caculation using Last Row

    Glad I could help

    Thanks for the rep, feedback, and for marking the thread as solved!

    Great that you posted the full solution for others to see if they encounter similar problems.

+ 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. [SOLVED] HELP! My caculation is running SLOW!
    By jrjeffcoat64 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-30-2019, 02:57 PM
  2. caculation of vacation hours
    By Barb54 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-04-2016, 10:45 AM
  3. Income tax caculation
    By lanso in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-03-2014, 12:05 PM
  4. [SOLVED] I need to add a margin caculation to a formula
    By mikerules in forum Excel General
    Replies: 3
    Last Post: 04-22-2014, 12:01 PM
  5. permenant manaul caculation setting
    By clement.store in forum Excel General
    Replies: 4
    Last Post: 01-29-2009, 08:39 AM
  6. Military time caculation help needed
    By azdps in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-12-2006, 01:51 PM
  7. [SOLVED] days caculation
    By Joe in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-01-2005, 10:05 PM

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