+ Reply to Thread
Results 1 to 2 of 2

Help with Formula in Code

  1. #1
    Juan
    Guest

    Help with Formula in Code

    Hi,
    have following Code that I would like to modify. So instead of dividing, I
    want to Sum but can't seem to get the right logic.
    ' Dim i as long

    For i = 1 To ActiveSheet.UsedRange.Rows.Count
    If Cells(i, "A") = "" Then
    Cells(i, "o").Value = Cells(i, "I") / Cells(i, "N")
    End If
    Next
    Basically, I want to sum of columns I throuh N where Column A is Blank in
    Column O.

    Please advise any info would really appreciate it.

    Thanks,
    Juan

  2. #2
    Juan
    Guest

    RE: Help with Formula in Code

    Hello JMB,
    Thanks alot. Seems to work

    Really appreciated the help.

    Juan

    "JMB" wrote:

    > Cells(i, "o").Value = application.sum(range(Cells(i, "I"), Cells(i, "N")))
    >
    >
    >
    > "Juan" wrote:
    >
    > > Hi,
    > > have following Code that I would like to modify. So instead of dividing, I
    > > want to Sum but can't seem to get the right logic.
    > > ' Dim i as long
    > >
    > > For i = 1 To ActiveSheet.UsedRange.Rows.Count
    > > If Cells(i, "A") = "" Then
    > > Cells(i, "o").Value = Cells(i, "I") / Cells(i, "N")
    > > End If
    > > Next
    > > Basically, I want to sum of columns I throuh N where Column A is Blank in
    > > Column O.
    > >
    > > Please advise any info would really appreciate it.
    > >
    > > Thanks,
    > > Juan


+ 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