View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Dave[_85_] Dave[_85_] is offline
external usenet poster
 
Posts: 5
Default Worksheet_BeforeDoubleClick subtract sum of cells below top cell

On Monday, January 4, 2021 at 9:41:57 AM UTC+10:30, Dave wrote:
On Monday, January 4, 2021 at 1:59:21 AM UTC+10:30, dpb wrote:
On 1/2/2021 7:53 AM, Dave wrote:
On Friday, January 1, 2021 at 1:29:22 AM UTC+10:30, Peter T wrote:
Dave,

I think you will need to explain much more clearly what you want to do. I
sort of got the gist but not enough to even think making a suggestion.

Peter T

Hello Peter,

I realised this probably did not make sense so I thought I had deleted the post, so I was surprised to get a reply.

...

Just as a little background to explain that...

m.p.e.p is a usenet newsgroup. It may not look like anything but a
typical forum on google groups, but messages are broadcast to any and
all subscribed news servers, not just retrieved from a central location..

While there is a "delete" protocol, virtually no nntp (network news
transport protocol) servers implement it. Hence, the thread is out
there and will be forever whether you can delete it from the local
server/group display server you use or not...

--

Hello Peter,

I really appreciate your reply and yes I was being a bit vague and just realised I stuffed up with my end result calculation (sorry for any confusion).
If you do a web search on 'First' cell or 'Top' cell there are many, many results without being specific to what I was asking and the terms seemed to generate quite a bit of confusion.
I was deliberately trying to avoid using cell references as I have noted on various other forums that even though someone asks for a dynamic or non specific range, as soon as they quote cell references the answers come back with specific column and row references.
So here is my question in term of cell references:
D3 = 5,180
D4 = 1,220
D5 = (1,380 / 2)
D6 = (500 + 500)
D7 = 2,270

So if you double click in cell D7 (blank cell) the macro would insert a formula i.e. D3 - D4 - D5 - D6 OR D3 - SUM(D4:D6). Where cell D3 is what I am referring to as being the 'First' cell or 'Top' cell.
I was hoping the result would be a formula and not a value, so I can select it in the formula bar and check or manually edit which cells were used in the formula calculations.

Thank you for your help.
Regards, David