Need help with excel message pop up

Solved/Closed
dave - May 5, 2010 at 03:23 PM
Trowa - May 6, 2010 at 09:43 AM
I need Excel VB help to show a message pop up box to display whenever the value is below 10 or greater then 50 that's also not a multiple of 5

Related:

3 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 5, 2010 at 04:40 PM
you need help with msgbox or the if statement ?
I don't know what would easier. I basically want only certain values to be valid in a specific field. And if an incorrect value is added a message to display
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 6, 2010 at 07:07 AM
Is it for data validation ? By this I mean do you want prevent user to type in any thing that is less than 10 or have any thing greater than 50 which is not a multiple of 5
Hi Rizvisa,

I was just checking the forum and came to this post. I'm curious how you would apply data validation with two statements: only allow a number between 10 and 50 which isn't divisible by 5.

Best regards,
Trowa
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 6, 2010 at 09:13 AM
Hey Trowa. how that graph thing is coming up.

This work for me for the original question, in the validation I have this formula

=IF(A1="",TRUE,IF(OR(A1<10,AND(A1>50,MOD(A1,5)<>0)),FALSE,TRUE))

it allows if data is either "", or is >10 and <50 or is >50 but is a multiple of 5

For your question to only allow a value between 10 and 50 when it is not divisible by 5
=IF(A1="",TRUE,IF(OR(A1<10, A1>50, MOD(A1,5)=0),FALSE,TRUE))

or this
=NOT(AND(A1<>"",OR(A1<10,A1>50,MOD(A1,5)=0)))
Thanks Rizvisa for your answer. Some knowledge just fades away after not using it for a while. That's why I use this forum to keep my Excel muscles in shape. Thanks for helping me with my exercise :).

My graph is working very smoothly, thanks for asking!

Kind regards,
Trowa