Results 1 to 11 of 11

What is wrong with my code here? (Missing IF or End Sub statement?)

Threaded View

Brookshire What is wrong with my code... 07-23-2013, 10:48 AM
AndyLitch Re: What is wrong with my... 07-23-2013, 10:51 AM
The_Prist Re: What is wrong with my... 07-23-2013, 10:52 AM
Solus Rankin Re: What is wrong with my... 07-23-2013, 10:53 AM
LaffyAffy13 Re: What is wrong with my... 07-23-2013, 10:53 AM
Brookshire Re: What is wrong with my... 07-23-2013, 11:06 AM
LaffyAffy13 Re: What is wrong with my... 07-23-2013, 11:11 AM
Solus Rankin Re: What is wrong with my... 07-23-2013, 11:11 AM
Brookshire Re: What is wrong with my... 07-23-2013, 12:58 PM
Solus Rankin Re: What is wrong with my... 07-23-2013, 01:06 PM
Brookshire Re: What is wrong with my... 07-23-2013, 01:32 PM
  1. #6
    Registered User
    Join Date
    06-19-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: What is wrong with my code here? (Missing IF or End Sub statement?)

    work.Range("Q121").Value = wsh.Range("AC" & r).Value
    work.Range("Q124").Value = wsh.Range("AC" & r).Value
    work.Range("Q127").Value = wsh.Range("AC" & r).Value
    work.Range("Q130").Value = wsh.Range("AC" & r).Value
    work.Range("Q133").Value = wsh.Range("AC" & r).Value
    work.Range("Q136").Value = wsh.Range("AC" & r).Value
    work.Range("Q139").Value = wsh.Range("AC" & r).Value
    work.Range("Q142").Value = wsh.Range("AC" & r).Value
    work.Range("Q145").Value = wsh.Range("AC" & r).Value
    work.Range("Q148").Value = wsh.Range("AC" & r).Value
    work.Range("Q151").Value = wsh.Range("AC" & r).Value
    work.Range("Q154").Value = wsh.Range("AC" & r).Value
    work.Range("Q157").Value = wsh.Range("AC" & r).Value
    work.Range("Q160").Value = wsh.Range("AC" & r).Value
    work.Range("Q163").Value = wsh.Range("AC" & r).Value
    work.Range("Q166").Value = wsh.Range("AC" & r).Value
    work.Range("Q169").Value = wsh.Range("AC" & r).Value
    work.Range("Q172").Value = wsh.Range("AC" & r).Value
    work.Range("Q175").Value = wsh.Range("AC" & r).Value
    work.Range("Q178").Value = wsh.Range("AC" & r).Value
    work.Range("Q181").Value = wsh.Range("AC" & r).Value
    work.Range("Q184").Value = wsh.Range("AC" & r).Value
    'Next r
    End If
    End If
    End If
    End If
    End If

    'start next workbook

    work

    End Sub
    Okay, I've added an End If for every If statement but now I'm getting an error saying "For without Next" highlighting End Sub
    Last edited by Brookshire; 07-23-2013 at 11:08 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code for email alerts from excel isn't working, wrong code possibly?
    By jessthorogood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 01:45 AM
  2. =SUM(C18:C20) Calculating wrong missing out cell
    By brierleystuartj in forum Excel General
    Replies: 6
    Last Post: 06-21-2012, 05:03 PM
  3. If Statement in Function code, what is missing?
    By ChicPea in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-22-2009, 03:33 AM
  4. cant figure out what I'm doing wrong or missing...
    By soundengineer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-25-2007, 07:40 PM
  5. What is wrong with this IF statement? need help.
    By AC man in forum Excel General
    Replies: 4
    Last Post: 01-11-2006, 11:35 AM

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