Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Restiction of cell value

I have three (3) cells into which a value (%) can be entered. A 4th cell will
be for the result of a calculation using either only one of those cells or
both of the other cells. For example: A1 or, A2 and A3 will have a percentage
to be calculated using the value in B1 and the result placed in B2. I want
to be able to insert a value in A1 and if so, restrict any value from being
placed in A2 & A3...and vice versa. Here is what I want to do as explained in
English. If A1 has a value, then multiply it by BI and place the result in
B2. If both A2 & A3 have a value, then multiply it by B1 and place the
result in B2. The problem is, I want to place a value only into A1 or only
into both A2 & A3 ! If A1 has a value, then I need to restrict any values
being placed in A2 & A3...and vice versa. Sorry for the long explanation.
Can anyone help?
--
Ken Michaels
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Restiction of cell value

You can use Data Validation for this.

Select Cell A1
From the Data Menu, choose "Validation"
Change the Allow Field to "Custom"
Uncheck the "Ignore blank" box
Enter the formula: =AND(A2="",A3="")
Click OK
Now Select Cells A2 and A3
From the Data Menu, choose "Validation"
Change the Allow Field to "Custom"
Uncheck the "Ignore blank" box
Enter the formula: =$A$1=""
Click OK
Now, in cell B2, enter the formula: =IF(A1="",(A2+A3)*B1,A1*B1)

You may need to adjust the formula in B2. I'm just assuming that you want
A2 and A3 added together?

Note, that Data Validation only prevents users from manually entering data
into cells. It will not prevent data resulting from a formula, or data being
pasted into the cell.

HTH,
Elkar


"Ken" wrote:

I have three (3) cells into which a value (%) can be entered. A 4th cell will
be for the result of a calculation using either only one of those cells or
both of the other cells. For example: A1 or, A2 and A3 will have a percentage
to be calculated using the value in B1 and the result placed in B2. I want
to be able to insert a value in A1 and if so, restrict any value from being
placed in A2 & A3...and vice versa. Here is what I want to do as explained in
English. If A1 has a value, then multiply it by BI and place the result in
B2. If both A2 & A3 have a value, then multiply it by B1 and place the
result in B2. The problem is, I want to place a value only into A1 or only
into both A2 & A3 ! If A1 has a value, then I need to restrict any values
being placed in A2 & A3...and vice versa. Sorry for the long explanation.
Can anyone help?
--
Ken Michaels

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 can I make a blank cell in a formula cell with a range of cell Vi Excel Discussion (Misc queries) 5 June 21st 07 02:46 PM
Inputting cell value from source cell based on value in adjacent cell. michaelberrier Excel Discussion (Misc queries) 3 December 9th 06 09:16 PM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 1 February 11th 05 06:36 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM


All times are GMT +1. The time now is 09:47 PM.

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"