+ Reply to Thread
Results 1 to 3 of 3

write data to worksheet using rowcount current region

  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    2

    write data to worksheet using rowcount current region

    I'm using this code to write to worksheet:

    Please Login or Register  to view this content.
    I have this formula (IF(ISBLANK(A3),"",Sum(F2-D3+E3)) in Column F and use autofill from F2 through F1000.

    The problem I have is that when I click command button on user form, it writes data (first empty row) in cells A1001, B1001, C1001, D1001.
    If I remove the formula from Column F, it writes data in correct row, but Then I have to Manually enter formula in F column.

    Is it possible to have vba code to insert formula and autofill to return proper value in column F?

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: write data to worksheet using rowcount current region

    Try this...

    RowCount = Worksheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row

  3. #3
    Registered User
    Join Date
    06-25-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: write data to worksheet using rowcount current region

    Thats it!! Thank You for your time and dedication to helping us that are vba challenged.

+ 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