Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do you hide SUM(number1,[number2],... | Excel Worksheet Functions |