LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,182
Default How to add random cells and get a sum value in another cell than status bar.

Claus Busch wrote:

Hi,

Am Sat, 8 Oct 2016 09:58:43 +0100 schrieb Umi:

I want to make a function table in excel for example:
a: 10
b: 20
c: 30
d: 40

When I select "a" and "b" it should add it and give the value "30"
in another cell.


Alternative:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Range("A1") = Application.Sum(Selection)

End Sub

ignores text values


Derp. I almost never think to use worksheet formulae.


This approach offers a great deal of flexibility over std VB functions.
You can also get most of this in your VB6 projects via the OWC
(spreadsheet control) hidden or visible on a form.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


 
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
random range of cells via cell names [email protected] Excel Programming 3 February 19th 14 07:01 PM
fill any random cell in a column and block all other cells SK Excel Discussion (Misc queries) 5 October 12th 09 07:20 PM
random cell selection from a column of cells MF Excel Worksheet Functions 2 March 15th 09 10:50 PM
reuest formula for auto update status & status date PERANISH Excel Worksheet Functions 5 June 2nd 08 04:26 PM
Status Bar Calculating Cells 50% Neil[_14_] Excel Programming 2 October 16th 03 01:56 PM


All times are GMT +1. The time now is 08:24 AM.

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

About Us

"It's about Microsoft Excel"