Results 1 to 6 of 6

Formula with variable

Threaded View

  1. #1
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Formula with variable

    I am trying to use a formula with a variable with no success. Could someone point out the syntax for me?


    Sub SplitOverheads()
    
      Dim LR As Long
      Dim i As Long
      Dim ws As Worksheet
        
        Set ws = WSOverhead
      
        LR = ws.Cells(ws.Rows.Count, 3).End(xlUp).Row + 1
        
            For i = 2 To 20
              ws.Cells(LR, 2).Value = ws.Range("J" & i).Value
              ws.Cells(LR, 3).Value = WorksheetFunction.Sum(Range("K" & i & "/L2"))
              LR = LR + 1
            Next i
    End Sub
    Last edited by JapanDave; 01-13-2012 at 06:20 AM.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

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