Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet that includes multiple comment boxes and have come across
something I need help with. If the value in a1 15 then show a warning "value is greater than 15" If the valude in a1 < 15 then show "acceptable value" I'm a newbie at VB and Script Editor so details would be most appreciated!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
What about a1 = 15? Seems a lot of trouble to put this in a cell comment, if that is what you mean. In a second column you could put the formula =if(a1<15,"acceptable value","value is greater than or equal to 15") or you could use conditional formatting, with condition a1<15 to colour acceptable values. No need for macros with either of these approaches. regards Paul |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
right click on the worksheet tab and select view code.
then choose the Calculate event. Private Sub Worksheet_Calculate() if Range("A1").Value 15 then Range("A1").NoteText Text:="value is greater than 15" else Range("A1").NoteText Text:="acceptable value" end if End Sub If the cell will be altered by editing it, then perhaps you want to use Data=Validation which does not require a macro, but can be overwritten by pasting into the cell. -- Regards, Tom Ogilvy " wrote: Hi What about a1 = 15? Seems a lot of trouble to put this in a cell comment, if that is what you mean. In a second column you could put the formula =if(a1<15,"acceptable value","value is greater than or equal to 15") or you could use conditional formatting, with condition a1<15 to colour acceptable values. No need for macros with either of these approaches. regards Paul |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I never thought about validation. That should work perfectly..thanks for your
help!! Tom Ogilvy wrote: right click on the worksheet tab and select view code. then choose the Calculate event. Private Sub Worksheet_Calculate() if Range("A1").Value 15 then Range("A1").NoteText Text:="value is greater than 15" else Range("A1").NoteText Text:="acceptable value" end if End Sub If the cell will be altered by editing it, then perhaps you want to use Data=Validation which does not require a macro, but can be overwritten by pasting into the cell. Hi What about a1 = 15? [quoted text clipped - 9 lines] regards Paul |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the response. I thought about that, but this is going to be a
document used by multiple people, and the purpose of the comment box is to play a role of a "warning" are you sure you want to use that value...any ideas? wrote: Hi What about a1 = 15? Seems a lot of trouble to put this in a cell comment, if that is what you mean. In a second column you could put the formula =if(a1<15,"acceptable value","value is greater than or equal to 15") or you could use conditional formatting, with condition a1<15 to colour acceptable values. No need for macros with either of these approaches. regards Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide & Show Rows based on Check Boxes | Excel Discussion (Misc queries) | |||
Can one cell hold multiple check boxes (and then sort based off e. | Excel Discussion (Misc queries) | |||
Show top five records based on meeting multiple criteria | Excel Worksheet Functions | |||
How can I edit a comment w/o first having to select Show Comment | Excel Discussion (Misc queries) | |||
Comment Boxes | Excel Programming |