Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Difficult formula question

I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i enter
into A1 but then appear if i were to delete the value (but not the formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Difficult formula question

Hi,

You would need VB for that but you can have this in another cell

=IF(A1<"",A1,SUM(A2:A10))

Mike

"JRD-CFW" wrote:

I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i enter
into A1 but then appear if i were to delete the value (but not the formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default Difficult formula question

Ummmm, what??


"JRD-CFW" wrote in message
...
I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i
enter
into A1 but then appear if i were to delete the value (but not the
formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Difficult formula question

If you don;t want the number to truly disappear, you can do:

Default format of A1 as Black
Default Format of A2:A10 as White

in cell A1:

conditional formatting
formula is:
=isnumber(A1)
format font as white

In cells A2:A10
formula is:
=isnumber(A1)
format font as Black.


=
"JRD-CFW" wrote:

I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i enter
into A1 but then appear if i were to delete the value (but not the formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Difficult formula question

Thanks for the quick responses. I've been able to figure it would by using
another cell but I guess I was hoping for a cleaner way of doing it.

What it VB?

P.S. The word "displaces" in my original post should have been "displays".
Sorry for any confusion.

"JRD-CFW" wrote:

I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i enter
into A1 but then appear if i were to delete the value (but not the formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Difficult formula question

Hi,

This is VB
Right click your sheet tab, view code and paste this in on the right then
try entering 1 in a1 and it does nothing. Delete the 1 and you get the sum of
a2 - a10 in a1.

I haven;t mafe it recalculate if you chnage a2 - a10 but that could be done

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Target.Address = "$A$1" Then
Application.EnableEvents = False
If IsEmpty(Target) Then
Target.Value = WorksheetFunction.Sum(Range("A2:a10"))
Else
If Target.Value = 1 Then
End If
End If
End If
Application.EnableEvents = True
End Sub

Mike

"JRD-CFW" wrote:

Thanks for the quick responses. I've been able to figure it would by using
another cell but I guess I was hoping for a cleaner way of doing it.

What it VB?

P.S. The word "displaces" in my original post should have been "displays".
Sorry for any confusion.

"JRD-CFW" wrote:

I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i enter
into A1 but then appear if i were to delete the value (but not the formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Difficult formula question

VB is Visual Basic

Right-Click on your tab name, select View Code, and enter the wonderful
world of VB!

"JRD-CFW" wrote:

Thanks for the quick responses. I've been able to figure it would by using
another cell but I guess I was hoping for a cleaner way of doing it.

What it VB?

P.S. The word "displaces" in my original post should have been "displays".
Sorry for any confusion.

"JRD-CFW" wrote:

I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i enter
into A1 but then appear if i were to delete the value (but not the formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Difficult formula question

Mike H, you are a genius. Thanks!

And I figured out how to make it recalculate the sum. Just "Delete" the sum
and it automatically recalculates it an enters in the new sum.

How do I find out more about VB so I can do it myself?

"Mike H" wrote:

Hi,

This is VB
Right click your sheet tab, view code and paste this in on the right then
try entering 1 in a1 and it does nothing. Delete the 1 and you get the sum of
a2 - a10 in a1.

I haven;t mafe it recalculate if you chnage a2 - a10 but that could be done

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Target.Address = "$A$1" Then
Application.EnableEvents = False
If IsEmpty(Target) Then
Target.Value = WorksheetFunction.Sum(Range("A2:a10"))
Else
If Target.Value = 1 Then
End If
End If
End If
Application.EnableEvents = True
End Sub

Mike

"JRD-CFW" wrote:

Thanks for the quick responses. I've been able to figure it would by using
another cell but I guess I was hoping for a cleaner way of doing it.

What it VB?

P.S. The word "displaces" in my original post should have been "displays".
Sorry for any confusion.

"JRD-CFW" wrote:

I would like to know whether there is a formula that does the following:

*when i number into A1 it displaces the number
*when i delete the number in A1 it displaces the sum of A2:A10

in other words, is the a formula that would underlie whatever value i enter
into A1 but then appear if i were to delete the value (but not the formula,
obviously) in A1

i thought i fought something that did that but i can't find it again.

Thanks.

JRD

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
Difficult ------------- question woo Excel Discussion (Misc queries) 1 May 6th 07 04:23 AM
difficult question Wu Excel Discussion (Misc queries) 2 April 1st 07 03:10 PM
Difficult (at least to me) formula question darkwood Excel Worksheet Functions 5 December 29th 05 01:39 PM
Very simple, but difficult formula question pugsly8422 Excel Worksheet Functions 4 July 7th 05 03:14 PM
Difficult Excel Question [email protected] Excel Discussion (Misc queries) 2 January 27th 05 12:10 PM


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