Results 1 to 52 of 52

If Then Statement - Still Not Working

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    If Then Statement - Still Not Working

    Hi,

    Can someone please help me. I can not figure out the issue with my code. Here is what I have so far:

    If ActiveSheet.Cells(7, 2).Value = [" & DEFName & "]Sheet1!R15C30:R11730C30" Then
    'If [" & DEFName & "]Sheet1!.Range("AC").Value = ActiveSheet.Cells(7, 2).Value Then
    Do
    Dim theRow As Integer
    For theRow = 31 To 70
    Range("AJ" & theRow).Select
    ActiveCell.FormulaR1C1 = _
    "=SUMIF([" & DEFName & "]Sheet1!R1C9:R2000C9,""" & Cells(theRow, 1) & """,[" & DEFName & "]Sheet1!R1C28:R2000C28)"
    Range("AK" & theRow).Select
    ActiveCell.FormulaR1C1 = _
    "=SUMIF([" & DEFName & "]Sheet1!R1C9:R2000C9,""" & Cells(theRow, 1) & """,[" & DEFName & "]Sheet1!R1C38:R2000C38)"
    Next theRow
    Loop While Range(AC).Value = "One: 1155" & Range("D").Value = "Project:"
    It keeps flagging my If statement(first line of code). Also, I have tried my If statement two different ways(one is commented out. I know the middle portion works, but I can not get the first line of code in the if statement right. Does anyone see anything wrong with the if statement(first line or second commented out line)???? Thanks in advance for your assistance with my code. - SEOT

    PS Thanks Mudraker for helping me with code wrap for easy reading. I forgot about that.
    Last edited by SEOT; 01-15-2009 at 08:12 PM.

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