+ Reply to Thread
Results 1 to 2 of 2

How to indicate 'starting' value for LastRow = (...)Rows.Count,1) (...)

  1. #1
    Registered User
    Join Date
    01-22-2018
    Location
    Poland
    MS-Off Ver
    2016
    Posts
    3

    How to indicate 'starting' value for LastRow = (...)Rows.Count,1) (...)

    Hi Guys,

    Please see below:

    LastRow = ThisWorkbook.Sheets("Issue Log").Cells(Rows.Count, 1).End(xlUp).Row - 4
    Me.tbTicketNo.Value = "[BHD#" & Format(LastRow, ["00000"]) & "]"

    The code is working but I would like to start counting from specific value e.g. 10000 = [BHD#10000]. The case is that I' dont want to write [BHD#10000] into cell A10000 but have [BHD#10000] in A1.

    I tried to solve this by adding value as shown below but as a/m I need to have this results starting from A1,A2,A3... not A10000,A100001 etc

    Me.tbTicketNo.Value = "[BHD#" & Format(10000 + LastRow, ["00000"]) & "]"


    Regards

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How to indicate 'starting' value for LastRow = (...)Rows.Count,1) (...)

    Maybe Change
    Please Login or Register  to view this content.
    To
    Please Login or Register  to view this content.
    Cheers
    Leo

+ 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. R1C1 lastRow not lastRow when data combined
    By Spyderwoman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2016, 05:20 PM
  2. [SOLVED] LastRow - for next loops longer than lastrow?
    By flabb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2016, 12:39 PM
  3. [SOLVED] Would like to do lastrow = activecolumn.usedrange.rows.count but it doesn't work
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2014, 04:19 PM
  4. [SOLVED] LastRow = ActiveSheet.UsedRange.Rows.Count not givng correct value
    By BobBlooms in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2012, 02:02 PM
  5. Match LastRow to Rows Above to Check for Duplicates Rows
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-13-2012, 08:10 AM
  6. Autofill to LastRow but Miss Out Some Rows!?
    By dvent in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-21-2011, 05:14 PM
  7. Count rows starting in particular row
    By bosco2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-27-2011, 02:20 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