+ Reply to Thread
Results 1 to 11 of 11

Help with vba coding debugging - I just cant see where I am going wrong ;(

  1. #1
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Help with vba coding debugging - I just cant see where I am going wrong ;(

    I think I have been staring at this too long - just cant see where I am going wrong with the coding below. The whole spreadsheet is aimed at helping the teachers at my school with their tracking etc.

    Sheets 26 to 28 have either M or F in Column G, which is filtered in the first part of the coding.

    If I run it with 'M' as criteria it works great, as soon as I change to 'F' it does all I ask, but I get a RunTime Error 13 'type mismatch' and the end.

    YET if I run Part 1 and Part 2 separately they work well.

    Any ideas?

    Thanks



    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    Hi,

    You really need to upload the workbook so that we may see your request in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    It is too big to attach

    Can I link to an external copy on googledrive or something?

  4. #4
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    I have uploaded to here as too big for Excel Forum. I hope that is allowed.

    HTML Code: 

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2505
    Posts
    2,792

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    I have uploaded to here as too big for Excel Forum. I hope that is allowed.
    Zip the file and upload the zipped file.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    Can't you remove all but a representative sample of your data? We don't need zillions of rows or sheets, just any data that is relevant and which is needed by the macro.

  7. #7
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    Zipped it is still 1.7mb which is too big.

    The macro applies to all sheets, I suppose I could edit it down to a sample for you...

  8. #8
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    AHA!

    While simplifying to upload for you guys to see I spotted and corrected the issue!

    Thanks.....while you only helped indirectly, you actually helped me solve it for myself!

    Ha

  9. #9
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2505
    Posts
    2,792

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    If you could post the solution so someone with a similar problem might be helped.

    Please click the Thread Tools drop down box above your first post and choose solved.

  10. #10
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    The loop was referencing a sheet without the M/F on it. Not sure why it worked with the M - should have failed on both.

    Please Login or Register  to view this content.
    should have read

    Please Login or Register  to view this content.

  11. #11
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2505
    Posts
    2,792

    Re: Help with vba coding debugging - I just cant see where I am going wrong ;(

    Okay, thanks.

    Second request:
    Please click the Thread Tools drop down box above your first post and choose solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. macro coding help (i have no background in coding)
    By notgoodenough in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2014, 10:22 PM
  2. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-02-2013, 11:16 PM
  3. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-02-2013, 05:04 AM
  4. Wrong coding or RANDBETWEEN is wrong?
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-31-2013, 10:01 AM
  5. [SOLVED] CheckBox coding to work with ComboBox coding
    By JimExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2013, 12:23 PM
  6. Coding and Reverse Coding a Questionnaire
    By lorr3 in forum Excel General
    Replies: 2
    Last Post: 11-18-2012, 06:43 PM
  7. [SOLVED] Implant macro coding into ASP coding
    By Sam yong in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2005, 06:05 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