+ Reply to Thread
Results 1 to 3 of 3

VBA beginner working with case statements.

  1. #1
    Registered User
    Join Date
    03-04-2021
    Location
    Louisville, KY
    MS-Off Ver
    2016
    Posts
    6

    Unhappy VBA beginner working with case statements.

    I am a VBA beginner trying to code an IFS substitute on a work laptop that doesn't have that function. I'm using case statements and am trying to figure out how to get my formula's output to be "Tacos" if the argument cell says "Tacos". However, I can't get it to work. I have very limited VBA knowledge so please answer as if you are speaking to a complete beginner .Screen Shot 2021-03-04 at 12.37.22 PM.png

  2. #2
    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
    44,366

    Re: VBA beginner working with case statements.

    Replace your references to Client with Food.
    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


  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: VBA beginner working with case statements.

    your function name is UIIFS so that should be your output -- presently UIIFS has no value assigned to it hence 0 return

    one further note, VBA is (unlike native XL) case sensitive by default -- i.e. TacoS <> Tacos... if you want to mimic IFS then consider convert both Criteria and Source strings to common case

    Please Login or Register  to view this content.

+ 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. Help for Beginner - Macro with IF Statements
    By RosieW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2017, 12:57 PM
  2. IF Statements (Beginner)
    By loganc123 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 02-03-2016, 12:42 AM
  3. Help with Case function on Macro - Beginner
    By gravedig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2015, 06:36 AM
  4. VBA Case statements
    By Gurureddevils in forum Excel General
    Replies: 1
    Last Post: 07-19-2015, 02:44 AM
  5. [SOLVED] Select Case statements after Search String not working
    By rdowney79 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-10-2013, 03:04 PM
  6. Password and case statements codes not working, but not erroring either
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-09-2013, 09:32 AM
  7. Beginner: SumIF not working
    By blubblub in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-09-2010, 05:47 PM

Tags for this Thread

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