Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RAZ RAZ is offline
external usenet poster
 
Posts: 120
Default Type only .25 or .5

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Type only .25 or .5

Hi,

Hi,

To conditionally format your cell(s):

In 2003:
1. Select the cell you want to format
2. Choose Format, Conditional Formatting
3. Choose Formula is from the first drop down
4. In the second box enter the formula:
=AND(A1<0.25,A1<0.5)
5. Click the Format button
6. Choose a color on the Patterns tab (or any available option)
7. Click OK twice.

In 2007:
1. Highlight all the cells on the rows you want formatted
2. Choose Home, Conditional Formatting, New Rule
3. Choose Use a formula to determine which cell to format
4. In the Format values where this formula is true enter the following
formula:
=AND(A1<0.25,A1<0.5)
5. Click the Format button and choose a format.
6. Click OK twice

If this helps, please click the Yes button.

Cheers,
Shane Devenshire

"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Type only .25 or .5

Hi

Use this as the CF formula

=AND(A1<0.25,A1<0.5)

Mike

"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Type only .25 or .5

You might also consider using Data Validation.
For example, assume the cell you have for this value is A4, go to menu
Data--Validation
Choose Custom under the Allow pull down
Then in criteria type the following formula:
=OR(A4=0.5,A4=0.25)

Note: If you have a range of cells for this, it is just as easy, select your
range, and type the above formula, substituting whichever cell is the
'active' cell in the selected range. (It will be the one that is not shaded
but is in the range). So long as you don't anchor the cell reference with $,
then it will change itself as needed.

--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RAZ RAZ is offline
external usenet poster
 
Posts: 120
Default Type only .25 or .5

thanks Mike and Shane,
it works.
but sorry i missed this when i asked the question.

I also want the cells to have no formatting when blank (empty)


"Mike H" wrote:

Hi

Use this as the CF formula

=AND(A1<0.25,A1<0.5)

Mike

"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RAZ RAZ is offline
external usenet poster
 
Posts: 120
Default Type only .25 or .5

thanks John, thats what i wanted actually (data validation)


"John C" wrote:

You might also consider using Data Validation.
For example, assume the cell you have for this value is A4, go to menu
Data--Validation
Choose Custom under the Allow pull down
Then in criteria type the following formula:
=OR(A4=0.5,A4=0.25)

Note: If you have a range of cells for this, it is just as easy, select your
range, and type the above formula, substituting whichever cell is the
'active' cell in the selected range. (It will be the one that is not shaded
but is in the range). So long as you don't anchor the cell reference with $,
then it will change itself as needed.

--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RAZ RAZ is offline
external usenet poster
 
Posts: 120
Default Type only .25 or .5

thanks John,
your formulla is working using data validation,
but how do I do this for selecting many cells.

i tried usiing this =OR(A4:B12=0.5,A4:B12=0.25)
but it still works in only one cell.


"John C" wrote:

You might also consider using Data Validation.
For example, assume the cell you have for this value is A4, go to menu
Data--Validation
Choose Custom under the Allow pull down
Then in criteria type the following formula:
=OR(A4=0.5,A4=0.25)

Note: If you have a range of cells for this, it is just as easy, select your
range, and type the above formula, substituting whichever cell is the
'active' cell in the selected range. (It will be the one that is not shaded
but is in the range). So long as you don't anchor the cell reference with $,
then it will change itself as needed.

--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Type only .25 or .5

I am assuming that all cells in range A4:B12 (i.e.: A4 to A12 and B4 to B12)
you want to have the data validation for?
If that is the case, click in cell A4, then highlight your entire range
(down to B12). If you'll notice, the cell A4 is still white, while the other
cells all have a shading to them.

Go to Data Validation, and type my formula exactly as indicated:
=OR(A4=0.5,A4=0.25)
and then choose your formatting

Since we are not anchoring the cells (i.e.: $A$4), the formula will
automatically adjust itself for all the other cells.
--
** John C **

"Raz" wrote:

thanks John,
your formulla is working using data validation,
but how do I do this for selecting many cells.

i tried usiing this =OR(A4:B12=0.5,A4:B12=0.25)
but it still works in only one cell.


"John C" wrote:

You might also consider using Data Validation.
For example, assume the cell you have for this value is A4, go to menu
Data--Validation
Choose Custom under the Allow pull down
Then in criteria type the following formula:
=OR(A4=0.5,A4=0.25)

Note: If you have a range of cells for this, it is just as easy, select your
range, and type the above formula, substituting whichever cell is the
'active' cell in the selected range. (It will be the one that is not shaded
but is in the range). So long as you don't anchor the cell reference with $,
then it will change itself as needed.

--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell color
should turn red.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Type only .25 or .5

Select your range A4:B12 and make sure that cell A4 is the active cell
(reference shown in the name box to the left of the formula bar). [Do this
by selecting A4 then shift B12, rather than B12 and then shift A4.]
Use the formula =OR(A4=0.5,A4=0.25)
If you then look at B7, for example, you will see that the A4s in the DV
formula will have been updated to B7s.
--
David Biddulph

"Raz" wrote in message
...
thanks John,
your formulla is working using data validation,
but how do I do this for selecting many cells.

i tried usiing this =OR(A4:B12=0.5,A4:B12=0.25)
but it still works in only one cell.


"John C" wrote:

You might also consider using Data Validation.
For example, assume the cell you have for this value is A4, go to menu
Data--Validation
Choose Custom under the Allow pull down
Then in criteria type the following formula:
=OR(A4=0.5,A4=0.25)

Note: If you have a range of cells for this, it is just as easy, select
your
range, and type the above formula, substituting whichever cell is the
'active' cell in the selected range. (It will be the one that is not
shaded
but is in the range). So long as you don't anchor the cell reference with
$,
then it will change itself as needed.

--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Raz" wrote:

I would like to have a conditional formulla, so that only .25 or .5
(Numbers) can be typed in a cell. If anything else is typed the cell
color
should turn red.



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
how to convert date type to text type Steffen Excel Discussion (Misc queries) 3 July 17th 07 11:32 AM
Excel will not let me type any characters....I can type in Word. deholly Excel Discussion (Misc queries) 1 March 17th 06 10:34 AM
Excel will not let me type any characters....I can type in Word. deholly Excel Discussion (Misc queries) 0 March 17th 06 10:20 AM
how to change all the words of one type(Gunsuh type)to another metumevlut Excel Discussion (Misc queries) 2 November 11th 05 03:29 PM
Adding new 'Type' to Format->Number->Time->Type Chip Pearson Excel Discussion (Misc queries) 5 September 26th 05 08:45 PM


All times are GMT +1. The time now is 01:00 AM.

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

About Us

"It's about Microsoft Excel"