+ Reply to Thread
Results 1 to 2 of 2

last column vba code

  1. #1
    Registered User
    Join Date
    06-30-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Question last column vba code

    Anyone can help me correct on below code:
    i need the answer in row 4


    Untitled.jpg


    Dim lastcol As Long

    lastcol = Cells(Columns.Count, "xfd").End(xlToLeft).Column

    Range("a4:XFD" & lastcol).FormulaR1C1 = "=R[-3]C+R[-2]C"

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: last column vba code

    bhchang84,

    I would use the Intersect method, like so:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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