Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default number1+ number2

Hi

I want to add two numbers together but not as in 2 + 2 = 4 but 22. Whats the
code I write?

Thanks Michael


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default number1+ number2

=2&2 gives 22

or =B1&C1 if the numbers were in cells B1 and C1

Regards

Trevor


"Himszy" wrote in message
. uk...
Hi

I want to add two numbers together but not as in 2 + 2 = 4 but 22. Whats
the
code I write?

Thanks Michael




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default number1+ number2


"Himszy" wrote in message
. uk...
Hi

I want to add two numbers together but not as in 2 + 2 = 4 but 22. Whats

the
code I write?

Thanks Michael



Doesn't matter just worked it out


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default number1+ number2

=2 & 2

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Himszy" wrote in message
. uk...
Hi

I want to add two numbers together but not as in 2 + 2 = 4 but 22. Whats

the
code I write?

Thanks Michael




  #5   Report Post  
Posted to microsoft.public.excel.programming
GB GB is offline
external usenet poster
 
Posts: 230
Default number1+ number2

Such as:

Public Function AddAsString(ByRef v1 As Variant, ByRef v2 As Variant) As
Variant
AddAsString = CStr(v1) & CStr(v2)
End Function

So that in your cell you call the function
AddAsString(2, 2)

?


"Himszy" wrote:

Hi

I want to add two numbers together but not as in 2 + 2 = 4 but 22. Whats the
code I write?

Thanks Michael





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default number1+ number2

Sub test()
With ActiveSheet.Range("K4")
.Value = 2 & 2
.NumberFormat = 0
End With
End Sub

Gord Dibben Excel MVP

On Wed, 29 Dec 2004 23:02:16 GMT, "Himszy" wrote:

Hi

I want to add two numbers together but not as in 2 + 2 = 4 but 22. Whats the
code I write?

Thanks Michael


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default number1+ number2

I think you can use:
CONCATENATE (text1,text2,...)
Text1, text2, ... are 1 to 30 text items to be joined into a single text
item. The text items can be text strings, numbers, or single-cell
references.


"Himszy" wrote in message
. uk...
Hi

I want to add two numbers together but not as in 2 + 2 = 4 but 22. Whats

the
code I write?

Thanks Michael




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
how do you hide SUM(number1,[number2],... Karen@Industrialrevolution Excel Worksheet Functions 6 September 24th 06 01:05 AM


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