Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have this situation:
Adress cell value A10 A A20 B A30 C A40 D A50 E A60 F A70 G I want to merge value all cell from A0 to A79 and put in cell A80 as SUM(A0:A79) in numeric. I want that value in cell A80 is ABCDEF. For example If delete row A30 value in A79(before A80) is ABDEF If add row A20 and put value in cell X, value in A81(before A80) is AXBCDEF Do you have any idea Bing |
#2
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Il 12/12/2012 10:33, Bing ha scritto:
I have this situation: Adress cell value A10 A A20 B A30 C A40 D A50 E A60 F A70 G I want to merge value all cell from A0 to A79 and put in cell A80 as SUM(A0:A79) in numeric. I want that value in cell A80 is ABCDEF. For example If delete row A30 value in A79(before A80) is ABDEF If add row A20 and put value in cell X, value in A81(before A80) is AXBCDEF Do you have any idea Bing ----------------- Function SumC(rng As Range) As String Dim c As Range For Each c In rng SumC = SumC & c Next End Function ----------------- Hi, E. |
#3
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
-----------------
Function SumC(rng As Range) As String Dim c As Range For Each c In rng SumC = SumC & c Next End Function ----------------- Sub sum() Dim c As Range For Each c In Range("E770:E790") SumC = SumC & c Next ActiveCell.Value = SumC End Sub Thanks. It works Another question I want to select range with mouse instead of ("E770:E790") |
#4
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Il 12/12/2012 12:11, Bing ha scritto:
----------------- Function SumC(rng As Range) As String Dim c As Range For Each c In rng SumC = SumC & c Next End Function ----------------- Sub sum() Dim c As Range For Each c In Range("E770:E790") SumC = SumC & c Next ActiveCell.Value = SumC End Sub Thanks. It works Another question I want to select range with mouse instead of ("E770:E790") You can use "selection" instead of "E770:E790" |
#5
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
-----------------
Function SumC(rng As Range) As String Dim c As Range For Each c In rng SumC = SumC & c Next End Function ----------------- Sub sum() Dim c As Range For Each c In Range("E770:E790") SumC = SumC & c Next ActiveCell.Value = SumC End Sub Thanks. It works Another question I want to select range with mouse instead of ("E770:E790") You can use "selection" instead of "E770:E790" Sub sum() Dim c As Range For Each c In Range("Selection") SumC = SumC & c Next Range("E740").Activate ActiveCell.Value = SumC End Sub select cell with mouse and start: Run-time error '1004' Method 'Range' of object '_Global' failed debug in line For Each c In Range("Selection") with For Each c In Range(Selection) same result |
#6
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Am Thu, 13 Dec 2012 11:18:42 +0100 schrieb Bing: For Each c In Range("Selection") change it to: For Each c In Selection Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#7
![]()
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
change it to:
For Each c In Selection Thanks. It works |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - Formatting text in cell (character by character) | Excel Discussion (Misc queries) | |||
Test if Last Character in Column of Cells is Alpha Character | Excel Programming | |||
Excel-Match 1st text character in a string to a known character? | Excel Worksheet Functions | |||
importing undelimited text file data, character-by-character | Excel Programming | |||
Function to return Character Position of Xth character within a string | Excel Programming |