Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Overwriting a cell with a formula without deleting the formula

Hello. I am creating an Expense Report worksheet and have created a simple
formula that will calculate mileage based on total miles. Below is my
worksheet data.

A B C
D
1 Expense Type Acct. Code Total Miles Amount
2 Airfare 11111
$250.00
3 Mileage 22222 20
$10.00

I am trying to figure out a way to create a conditional formula so that IF
Expense Type is "Mileage", data in "Total Miles" must not be blank, and the
"Amount" will automatically calculate based on the formula "C3*.50".

Additionally, I want to be able to enter an Amount in Column D without
overwriting the underlying formula. For example, say in A2 I enter Expense
Type "Airfare" and then enter the total amount of $250.00 Column D. Once I
enter data in Column D, I overwrite the formula. If I need to go back and
change the Expense Type to "Mileage", Column D won't automatically calculate
anymore. By typing data into this cell, I have essentially deleted the
formula. Is there a way to maintain the underlying conditional formula while
at the same allowing me to manually enter data in that cell without losing
the formula?

Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Overwriting a cell with a formula without deleting the formula

Use two cells.

Say we have a formula in A1:

=SUM(A2:A100)

Sometimes we would like to override the formula with a fixed value and still
have the formula available.

Use B1 for the fixed value and in A1:

=IF(ISBLANK(B1),SUM(A2:A100),B1)
--
Gary''s Student - gsnu200909


"MsBeverlee" wrote:

Hello. I am creating an Expense Report worksheet and have created a simple
formula that will calculate mileage based on total miles. Below is my
worksheet data.

A B C
D
1 Expense Type Acct. Code Total Miles Amount
2 Airfare 11111
$250.00
3 Mileage 22222 20
$10.00

I am trying to figure out a way to create a conditional formula so that IF
Expense Type is "Mileage", data in "Total Miles" must not be blank, and the
"Amount" will automatically calculate based on the formula "C3*.50".

Additionally, I want to be able to enter an Amount in Column D without
overwriting the underlying formula. For example, say in A2 I enter Expense
Type "Airfare" and then enter the total amount of $250.00 Column D. Once I
enter data in Column D, I overwrite the formula. If I need to go back and
change the Expense Type to "Mileage", Column D won't automatically calculate
anymore. By typing data into this cell, I have essentially deleted the
formula. Is there a way to maintain the underlying conditional formula while
at the same allowing me to manually enter data in that cell without losing
the formula?

Thanks for your help!

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 do I delete data in a cell without deleting formula? tripy Excel Worksheet Functions 9 January 1st 21 10:27 AM
Deleting cell data without deleting formula Tom Hall Excel Discussion (Misc queries) 4 October 29th 06 04:07 PM
Overwriting prior formula Mark Excel Worksheet Functions 3 August 15th 06 03:03 PM
how prevent formula in cell from deleting when deleting value???? sh-boom New Users to Excel 1 September 30th 05 06:12 PM
cell is reinserting a formula in even after deleting it. Why Michele Dickinson Excel Discussion (Misc queries) 5 February 8th 05 03:31 PM


All times are GMT +1. The time now is 04:04 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"