Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB code + Data Validation query


Hi there,

I am trying to assign data validation to a cell in a spreadsheet using
VB code, which as i understand is quite simple. I would also like to
create a 'warning' system, which returns a symbol to indicate whether
or not the validation has been met. For example, a red circle in the
adjacent cell if the validation has not been met, or a green circle if
it has. Is there a code which would meet these requirements? Or could
you advise me as to a better way of doing this?

Thanks,

Jenny


--
Jennyc114
------------------------------------------------------------------------
Jennyc114's Profile: http://www.excelforum.com/member.php...o&userid=24908
View this thread: http://www.excelforum.com/showthread...hreadid=384466

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default VB code + Data Validation query

Creating a macro is simple. Turn the macro recorder on and do it manually,
you will have a macro.

The circle seems harder, but as DV can be setup so that invalid values
cannot be entered, why bother?

--
HTH

Bob Phillips

"Jennyc114" wrote
in message ...

Hi there,

I am trying to assign data validation to a cell in a spreadsheet using
VB code, which as i understand is quite simple. I would also like to
create a 'warning' system, which returns a symbol to indicate whether
or not the validation has been met. For example, a red circle in the
adjacent cell if the validation has not been met, or a green circle if
it has. Is there a code which would meet these requirements? Or could
you advise me as to a better way of doing this?

Thanks,

Jenny


--
Jennyc114
------------------------------------------------------------------------
Jennyc114's Profile:

http://www.excelforum.com/member.php...o&userid=24908
View this thread: http://www.excelforum.com/showthread...hreadid=384466



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB code + Data Validation query


what about using conditional formatting instead of data validation?


--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=384466

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB code + Data Validation query


MattShoreson Wrote:
what about using conditional formatting instead of data validation?


Ok thanks, what does conditional formatting do? what code do you use to
apply it?


--
Jennyc114
------------------------------------------------------------------------
Jennyc114's Profile: http://www.excelforum.com/member.php...o&userid=24908
View this thread: http://www.excelforum.com/showthread...hreadid=384466

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB code + Data Validation query


My spreadsheet is automatically updated by a macro to pull data from an
online source. Differences between this actual data and predicted data
is then calculated by the spreadsheet, and i need to create a warning
system to alert the user of whether or not the differences are outwith
a certain range. It would be more user-friendly, because if the data
validation disallowed invalid data it would disrupt the macro and
prevent it from running. As far as i am aware, if you turn the macro
recorder on, it will record the code for applying data validation, but
then there is now way of telling it that you are colouring the circle
green because the validation has been met or red if not. I was
therefore asking if there was a code which sorted this?

Jenny





Bob Phillips Wrote:
Creating a macro is simple. Turn the macro recorder on and do it
manually,
you will have a macro.

The circle seems harder, but as DV can be setup so that invalid values
cannot be entered, why bother?

--
HTH

Bob Phillips

"Jennyc114"
wrote
in message
...

Hi there,

I am trying to assign data validation to a cell in a spreadsheet

using
VB code, which as i understand is quite simple. I would also like to
create a 'warning' system, which returns a symbol to indicate

whether
or not the validation has been met. For example, a red circle in the
adjacent cell if the validation has not been met, or a green circle

if
it has. Is there a code which would meet these requirements? Or

could
you advise me as to a better way of doing this?

Thanks,

Jenny


--
Jennyc114

------------------------------------------------------------------------
Jennyc114's Profile:

http://www.excelforum.com/member.php...o&userid=24908
View this thread:

http://www.excelforum.com/showthread...hreadid=384466



--
Jennyc114
------------------------------------------------------------------------
Jennyc114's Profile: http://www.excelforum.com/member.php...o&userid=24908
View this thread: http://www.excelforum.com/showthread...hreadid=384466



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB code + Data Validation query


Assuming you are displaying all values whether they pass validation o
not.

e.g.
A1 contains true
A2 contains false

in B1 use the menu formatconditionalformatting.
dropdown box select formula is - =A1=TRUE and select format

click add
and then dropdown box select formula is - =A1=FALSE and selec
different format.

Colour of cell will alter dependant on value.
NB This formatting can also be created via code

--
MattShoreso
-----------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...nfo&userid=347
View this thread: http://www.excelforum.com/showthread.php?threadid=38446

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default VB code + Data Validation query


Look up 'Highlight cells that meet specific conditions' in the Answer
wizard in help

--
HTH

Bob Phillips

"Jennyc114" wrote
in message ...

MattShoreson Wrote:
what about using conditional formatting instead of data validation?


Ok thanks, what does conditional formatting do? what code do you use to
apply it?


--
Jennyc114
------------------------------------------------------------------------
Jennyc114's Profile:

http://www.excelforum.com/member.php...o&userid=24908
View this thread: http://www.excelforum.com/showthread...hreadid=384466



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation Query SiH23 Excel Discussion (Misc queries) 1 August 9th 07 07:36 PM
Data Validation Query Rhonda Anderson Excel Discussion (Misc queries) 2 July 15th 07 11:42 AM
data validation query katet Excel Worksheet Functions 1 March 6th 07 04:30 PM
Data Validation Query ALEX Excel Discussion (Misc queries) 1 January 26th 07 01:33 PM
Data Validation from a database query ? sean2000 Excel Programming 6 June 28th 05 08:52 AM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"