+ Reply to Thread
Results 1 to 10 of 10

Adding extra case to macro...

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    44

    Adding extra case to macro...

    Hi, i have this code that works on the basis of people entering information.
    I just want to add more cases similar to case 11 but depending on what is typed in?

    thanks, and if anybody wants more info, please ask
    Michael

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Adding extra case to macro...

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    02-28-2013
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Adding extra case to macro...

    such a small addition, thanks very much.
    btw is there anything that you can but in the -value = "john"- part that would mean anything else written do this?

    Thanks

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Adding extra case to macro...

    i'm sorry, english is not my langage, can you explain in other words ?

  5. #5
    Registered User
    Join Date
    02-28-2013
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Adding extra case to macro...

    So if I had a cell that you could write "blue" in it would move that row, and if you wrote "red" it would move it somewhere else...
    So if someone wrote yellow or green or anything else neither would happen...

    So is there something that can be put so if it meets none of the above options it does something else like a msg box to tell you the only options are red or blue

  6. #6
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Adding extra case to macro...

    Please Login or Register  to view this content.

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Adding extra case to macro...

    Hi, mmcgrail,

    your chosen example differs a lot from the code you supplied in the Opening Post - I think you would like to keep the other checks as well:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  8. #8
    Registered User
    Join Date
    02-28-2013
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Adding extra case to macro...

    Hi, yeah I was trying to explain it more easily...but obviously haven't...

    Yes I would like the other checks but if someone enter something that wasn't in the above cases then to show a message box saying so...

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Adding extra case to macro...

    Hi, mmcgrail,

    like this?
    Please Login or Register  to view this content.
    Ciao,
    Holger

  10. #10
    Registered User
    Join Date
    02-28-2013
    Location
    Harrogate, England
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Adding extra case to macro...

    thats it! Im amazed that i didnt work that out myself!

    thanks very much Holger

+ 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. Vba code for remove extra full stops, and make sentence case.
    By satputenandkumar0 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-11-2013, 04:04 AM
  2. [SOLVED] adding target lines into graphs without adding an extra column of data
    By ea223 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-16-2013, 12:32 PM
  3. Replies: 8
    Last Post: 08-27-2012, 04:37 PM
  4. extra hours adding money for each extra hour worked FORMULA
    By cynthiamcastro in forum Excel General
    Replies: 3
    Last Post: 06-18-2012, 11:27 AM
  5. Adding extra data to existing Macro
    By rushdenx1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2011, 04:40 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