Results 1 to 3 of 3

Fill formula series using VBA

Threaded View

  1. #1
    Registered User
    Join Date
    04-16-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question Fill formula series using VBA

    Hello Experts,
    I want to fill this formula series
    =MID(Table_Query_from_table22[[#This Row],[file]],C2,D2-C2)
    say from row2 till row20 for a column.
    But the above formula is only valid for row2. What I want is for row3 the formula should change to
    =MID(Table_Query_from_table22[[#This Row],[file]],C3,D3-C3)
    and so on for other rows.....

    I tried the following code in VBA
    For iRow = 2 To lRowCount
    arg11 = "C" & iRow
    arg22 = "D" & iRow & "-C" & iRow

    Cells(iRow, "A").Formula = "=MID(Table_Query_from_perforce3023[[#This Row],[file]], arg11, arg22)"

    Next iRow
    but it inserts value in row as
    =MID(Table_Query_from_table22[[#This Row],[file]], arg11, arg22)
    .

    Please help me here...

    Thanks in advance

    Regards,
    Shrujan
    Last edited by shrujan; 04-20-2009 at 03:33 AM.

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