#1   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default sum character

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   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default sum character

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   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default sum character

-----------------
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   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default sum character

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   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default sum character

-----------------
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   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default sum character

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   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default sum character

change it to:
For Each c In Selection

Thanks. It works

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
Excel 2007 - Formatting text in cell (character by character) TomC Excel Discussion (Misc queries) 0 January 29th 10 08:25 PM
Test if Last Character in Column of Cells is Alpha Character Benjamin Excel Programming 6 September 21st 09 06:36 PM
Excel-Match 1st text character in a string to a known character? bushlite Excel Worksheet Functions 2 January 15th 07 07:36 PM
importing undelimited text file data, character-by-character The Mos$ Excel Programming 4 December 26th 05 12:01 PM
Function to return Character Position of Xth character within a string Andibevan[_2_] Excel Programming 4 June 9th 05 03:24 PM


All times are GMT +1. The time now is 12:35 PM.

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"