+ Reply to Thread
Results 1 to 5 of 5

Looping through cells

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Looping through cells

    Hi,

    I'm trying to loop through a specified number of cells (defined by width and height), but I'm running into problems here. It keeps stalling on me, and then gets upset about:

    Please Login or Register  to view this content.
    It's giving me an "Application defined or object defined error"


    Can anyone tell me where I'm going wrong with my code:

    Please Login or Register  to view this content.
    Last edited by FancyCorndog; 08-11-2012 at 05:01 PM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Looping through cells

    Good evening FancyCorndog

    In your code you need to refrain from using as variables any words that could be construed as standard VBA instructions (in this case "Min" and "Max").
    Change them in your Dim statement, and everywhere else they are mentioned and try again.

    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Looping through cells

    Quote Originally Posted by dominicb View Post
    Good evening FancyCorndog

    In your code you need to refrain from using as variables any words that could be construed as standard VBA instructions (in this case "Min" and "Max").
    Change them in your Dim statement, and everywhere else they are mentioned and try again.

    HTH

    DominicB
    Thanks for your help!

    I changed min and max to minVal and maxVal, but I'm getting the same error.

    Please Login or Register  to view this content.
    Last edited by FancyCorndog; 08-11-2012 at 05:13 PM.

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Looping through cells

    Hi FancyCorndog

    Can you upload a workbook of what you have so far?

    DominicB

  5. #5
    Registered User
    Join Date
    08-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Looping through cells

    It's too big to upload on the site but here it is from Google Docs:

    https://docs.google.com/open?id=0B7K...0paUS1wdHJySGs


    edit: It's supposed to run from the "Raw Data" sheet.
    Last edited by FancyCorndog; 08-11-2012 at 05:24 PM.

  6. #6
    Registered User
    Join Date
    08-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Looping through cells

    The problem was that I forgot to reset width on each row.

+ 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