+ Reply to Thread
Results 1 to 2 of 2

Find first and last number

  1. #1
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Find first and last number

    Hi all



    Using some VBA, I have a worksheet in mind and I would like to find out what the first number in a column (A)
    and what the last number in column A is.

    Assuming for arguments sake the first row is numbered 101 and the last row number 209 all in col A.



    Peter
    Posted elsewhere
    https://www.ozgrid.com/forum/forum/h...nd-last-number
    Last edited by Potholes; 10-24-2019 at 01:06 AM.
    One I have learnt over the last few months, " You are NEVER too old to learn ".
    Sometimes I forget to say " Thank You " for your assistance, so here I say " A BIG Thank You. "

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Find first and last number

    These functions will work when called from other VBA code or within a macro; however, you cannot use them as UDFs (user defined functions) within a worksheet formula. Since you did not tell us the worksheet, I am assuming it is the active sheet when these functions are called (you can add sheet references if you want to be able to use them when the sheet is not active). These functions take one argument... the range you want to evaluate.
    Please Login or Register  to view this content.
    Note: These functions assume your values in the cells of the specified range are constants. If they are formulas, the change the red highlighted xlConstants to xlFormulas.

+ 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] Find first number that is smaller than some number but divisible with other number
    By beard in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 07-20-2019, 12:24 PM
  2. [SOLVED] Not Returning Row Number With FIND statement When FIND should be valid
    By Jenn68 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2019, 02:22 PM
  3. VBA: Multiple text and number columns. Find list and number of unique words
    By first_jaguar in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-14-2017, 09:58 PM
  4. [SOLVED] Find Specific Number - If not found find next lowest number
    By mattyp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2017, 03:03 PM
  5. Replies: 1
    Last Post: 04-10-2017, 03:33 PM
  6. [SOLVED] Find match, find related cell and return that number
    By HelpHelpHelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-17-2012, 06:46 AM
  7. Replies: 7
    Last Post: 12-18-2008, 07:34 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