+ Reply to Thread
Results 1 to 33 of 33

Coding Multiple Cases in VBA

Hybrid View

  1. #1
    Registered User
    Join Date
    11-18-2005
    Posts
    17

    Coding Multiple Cases in VBA

    VBA NOOD

    I think I spoke too soon.

    It seems that if the first two cells are >50 then only their associated arrays print - like it is supposed to work.
    If the first cell is less than 50 then the first associate arrays doesn't print - like it is supposed to work..
    BUT
    If the first third and sixth cells are less than 50 then the first array does not print but ALL the others do.

    Don't know why....can you consider why this might be happeing?



    Thanks
    Last edited by billofsoo; 03-24-2009 at 09:23 PM.

  2. #2
    Registered User
    Join Date
    11-18-2005
    Posts
    17

    Re: Coding Multiple Cases in VBA

    VBA Nood

    Actually if all cells are less than 50 except the first cell then ALL arrays are printed. Can't see any problem with the code at all. In fact if only the third cell is greater than 50 then all pages still print. Weird!

    Let me know what you think - it is late here..need to go home. Will check for a response in the morning.

    Thanks a lot for your patience.

    BillofSoo

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Coding Multiple Cases in VBA

    Threads merged.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Coding Multiple Cases in VBA

    Using my example again it all seem to work.

    Post your file (remove any info) and I'll take a look or go with the other option you got

    VBA Noob
    Attached Files Attached Files
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Registered User
    Join Date
    11-18-2005
    Posts
    17

    Re: Coding Multiple Cases in VBA

    Thanks VBA Noob

    I have stripped out the info from the worksheet - left some in as well along with some notes so you don't have to work hard to figure out how I set this up. I included three modules you have seen and adjusted them to match my exact cell/array locations.

    Best of luck...hope you get this.

    Best regards,

    BillofSoo
    Attached Files Attached Files

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Coding Multiple Cases in VBA

    The missed changing one range address

    ArrRng = Array("K28", "J38", "J50", "J61", "J73", "J93")
    Is that you're problem?

    VBA Noob

  7. #7
    Registered User
    Join Date
    11-18-2005
    Posts
    17

    Re: Coding Multiple Cases in VBA

    VBA Noob

    I know what the problem is....in the cells that are tested >50, I have formulas!!! you have just numbers. When I put straight numbers in column K and adjust the module to accommodate, this code works as it is supposed to.

    How can I get the value obtained through the formula to appear in another cell as a value only?

    That will solve the problem.

    BillofSoo

+ 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