+ Reply to Thread
Results 1 to 13 of 13

my VBA code needs an adjustment

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    my VBA code needs an adjustment

    Please Login or Register  to view this content.
    The data I receive has changed.
    I believe the reason the code is not working is that the number of individual name entries in column A has increased to a maximum above 15, which is what i requested when this code was created.

    If someone has any any ideas I would be grateful.
    Last edited by arlu1201; 09-05-2012 at 10:46 AM. Reason: Replaced html tags with code tags.

  2. #2
    Registered User
    Join Date
    09-05-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: my VBA code needs an adjustment

    sorry - this is the correct code

    Please Login or Register  to view this content.
    Last edited by arlu1201; 09-05-2012 at 10:47 AM.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,325

    Re: my VBA code needs an adjustment

    That code doesn't appear to be limited (to 15 of anything).

    What does it do or not do that it didn't do or did do before? Is there an error message? If so, what is it and on which line does it occur?

    It would probably help a lot if you uploaded a sample workbook and explain the problem in more detail.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    09-05-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: my VBA code needs an adjustment

    problem possibly related to the zero's in column B?
    Attached Files Attached Files

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,325

    Re: my VBA code needs an adjustment

    There's no code in the sample workbook provided. However, I've copied the code from an earlier post. Seems to work OK for me. Again, what is it doing that it shouldn't or not doing that it should?

    Regards, TMS

  6. #6
    Registered User
    Join Date
    09-05-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: my VBA code needs an adjustment

    sorry - i wrongly thought the code would reveal that.

    the end result is.
    - 1 row for each name
    - each number next to the same name is transferred to that row, in order across the page
    eg.
    Elvis 45 37 28 84
    peter 46 98 36 89 etc

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: my VBA code needs an adjustment

    Frankie,

    I removed your posts where you were trying the tags out, to prevent other users from getting confused.

    For vba code, you need to put code tags. See my signature on how to do so.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,325

    Re: my VBA code needs an adjustment

    @Frankie: yep, that's exactly what it does ... but some rows have zero values.

    HTML Code: 

    Regards, TMS

  9. #9
    Registered User
    Join Date
    09-05-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: my VBA code needs an adjustment

    Ok - how can this code be changed to..

    1 - remove the zeros from column B
    2 - move numbers across so the result shows no blank cells where the zero's were
    3 - limit the numbers extracted up to the first 10 (counting from the top down the page -excluding zeros) and ignore the remainder.

    ANy chance of achieving that?
    Thanks in advance

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,325

    Re: my VBA code needs an adjustment

    Please Login or Register  to view this content.


    HTML Code: 

    Regards, TMS

  11. #11
    Registered User
    Join Date
    09-05-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: my VBA code needs an adjustment

    thanks! that works a treat!

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,325

    Re: my VBA code needs an adjustment

    You're welcome. Thanks for the rep.

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: my VBA code needs an adjustment

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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