Generating Error messages for empty fields in Excel

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ค. 2017
  • Generating Error messages for empty fields in Excel
    Generate error messages based on what is selected. Use Vba to generate error messages. Use the isempty command. Check that a merged and centered field is empty
    Click this link to check out my one-on-one training www.calendly.com/easyexcelanswers
    For more help visit my website www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.
    Contact me regarding customizing this template for your needs.
    Click for online Excel Consulting www.calendly.com/easyexcelanswers
    I am able to provide online help on your computer at a reasonable rate.
    www.amazon.com/shop/barbhende...
    I use a Blue condenser Microphone to record my videos, here is the link
    amzn.to/37gyyGa
    Check out Crowdcast for creating your webinars
    app.linkmink.com/a/crowdcast/83
    I use Tube Buddy to help promote my videos
    Check them out
    www.Tubebuddy.com/easyexcelan...
    Follow me on Facebook
    / easyexcel.answers
    TWEET THIS VIDEO
    Follow me on twitter
    easyexcelanswers
    IG @barbhendersonconsulting
    You can help and generate a translation to you own language
    th-cam.com/users/timedtext_cs_p...
    *this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I've used or have experience with.
    How to insert VBA code in Excel • How to insert VBA code...
    Sub errormsg()
    If IsEmpty(range(“C3”)) then
    Msgbox “Enter Given Name”
    GoTo ende
    Else
    If IsEmpty(range(“E3”)) then
    Msgbox “Enter Given Surname”
    GoTo ende
    End if
    end if
    If range(“C6”).value= “Termination” then
    If IsEmpty(range(“C9”)) then
    Msgbox “Comments are required if Termination is selected”
    GoTo ende
    End if
    end if
    end sub
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 9

  • @jennifergraham9495
    @jennifergraham9495 6 ปีที่แล้ว

    This was just what I was looking for! Thank you

  • @chrisdilYT
    @chrisdilYT 4 ปีที่แล้ว +3

    This is good but as a user, how would the macro get run? No command button to save the data or anything. The point of this code would be to make sure the form is filled out completely by someone else? The macro won't run automatically so it they leave comments blank after choosing termination at what point would they be prompted? This video seems incomplete on the full process on how it would work for the user.

  • @ahleee01
    @ahleee01 11 หลายเดือนก่อน

    Hi! May I please ask how may we apply the first code to an entire column or range of cells instead of single cell only?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  11 หลายเดือนก่อน

      If IsEmpty(range(“E:E”)) then
      Msgbox “Enter Given Surname”
      GoTo ende
      End if

    • @gaines4744
      @gaines4744 11 หลายเดือนก่อน

      @@BarbHendersonconsultingIs it possible to have one cell required out of an entire range? What would that command look like? Thanks

  • @jennifergraham9495
    @jennifergraham9495 6 ปีที่แล้ว

    What if you need to have more than one for the comments - like the termination and then they pick new hire and you still want them to fill out comments?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว

      You would just set up another comments field and have it linked to new hire and copy and modify the code for Range C4.value

    • @jennifergraham9495
      @jennifergraham9495 6 ปีที่แล้ว

      Barb Henderson I tired that - maybe I did the code wrong - it would run the first one but when I changed the text it wouldn’t work

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว

      contact me at easyexcelanswers@gmail.com maybe I do not understand the question