+ Reply to Thread
Results 1 to 6 of 6

Case Statement

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Case Statement

    I made this case statment below to look at a cell in Q and if the cell value is "Large Area" then the cell in P same row should be 1 if the case is Varsity then it would be 2 however I keep getting a Type Mismatch. I tried Picker.Text and Picker.Value as well I didn't get errors but it didn't work either.

    Any Idea's what is wrong?

    Thank You, Mike

    Please Login or Register  to view this content.
    Last edited by realniceguy5000; 06-16-2009 at 12:15 PM.

  2. #2
    Forum Contributor starryknight64's Avatar
    Join Date
    09-27-2006
    Location
    Missouri
    MS-Off Ver
    2003 (Work) & 2007 (Home)
    Posts
    193

    re: Case Statement

    Try instead of selecting based on "Picker" to selecting based on "Picker.Cells"

    You're selecting on a whole range rather than a particular cell.

    I hope this helps!
    starryknight64

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,979

    re: Case Statement

    See if this does what you need:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    re: Case Statement

    Quote Originally Posted by romperstomper View Post
    See if this does what you need:
    Please Login or Register  to view this content.
    Well that worked much better. However I am still having a small problem as I did in my last post with the if then statement. I need to use this line in my code to make the data match up correctly?

    Please Login or Register  to view this content.
    I'm just curious as to why the rows don't match up? Once I delete P3 then everything is correct.

    Thank You for the help...
    Mike

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,979

    re: Case Statement

    If it should be the same row, then change both instances of:
    Please Login or Register  to view this content.
    to just:
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    re: Case Statement

    Quote Originally Posted by romperstomper View Post
    If it should be the same row, then change both instances of:
    Please Login or Register  to view this content.
    to just:
    Please Login or Register  to view this content.
    Working Now, Thanks so much for the help.

    Mike

+ 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