Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Joining cells together

Hi there,

I have a values + or - in one column and the number in the next

What I want to do is add the + or - to the number i.e.

- in one column, 10 in the next you get -10

I know I can do this by using the & function but this is not the way I want
to do it

I don't want it to lookup, I would like it to be permament, and it must
totally replace the value 10 with -10 as in the above example

I hope this is not clear as mud, Hope someone can help

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200601/1
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Joining cells together

One way:

A1: 10
B1: =-A1

In article <5b144ff31badd@uwe,
"Danny Boy via OfficeKB.com" <u15117@uwe wrote:

Hi there,

I have a values + or - in one column and the number in the next

What I want to do is add the + or - to the number i.e.

- in one column, 10 in the next you get -10

I know I can do this by using the & function but this is not the way I want
to do it

I don't want it to lookup, I would like it to be permament, and it must
totally replace the value 10 with -10 as in the above example

I hope this is not clear as mud, Hope someone can help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Joining cells together

You can still use the & function then Copy/Paste Special Values over your
numbers. This will give you the look you desire, but they will not be
numbers, they will be text, and therefore cannot perform mathematics with
them. You can convert them to numbers with the Value() function, but then
you would lose the "+" with positive numbers. The "-" will remain on
negative numbers. The "+" in front of a number will render the number as
text and useless for calculations unless the Value() function is used on it.
You can't have it both ways with Positive numbers.

Mike F
"Danny Boy via OfficeKB.com" <u15117@uwe wrote in message
news:5b144ff31badd@uwe...
Hi there,

I have a values + or - in one column and the number in the next

What I want to do is add the + or - to the number i.e.

- in one column, 10 in the next you get -10

I know I can do this by using the & function but this is not the way I
want
to do it

I don't want it to lookup, I would like it to be permament, and it must
totally replace the value 10 with -10 as in the above example

I hope this is not clear as mud, Hope someone can help

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200601/1



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Joining cells together

Thanks for your responses

I don't have the option to use any of those methods,

I have cell A1 = 10 and B1 = -

This must change A1 to -10

I have no other option, I cannot use any other cells for joining,

Any others Ideas?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200601/1
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Joining cells together

One way:

Public Sub JoinNegs()
Dim rCell As Range
For Each rCell In Range("A1:A" & _
Range("A" & Rows.Count).End(xlUp).Row)
With rCell
If .Offset(0, 1).Text = "-" Then _
.Value = -.Value
End With
Next rCell
End Sub

In article <5b153e053bbd9@uwe,
"Danny Boy via OfficeKB.com" <u15117@uwe wrote:

Thanks for your responses

I don't have the option to use any of those methods,

I have cell A1 = 10 and B1 = -

This must change A1 to -10

I have no other option, I cannot use any other cells for joining,

Any others Ideas?



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
Joining the contents of several cells into a single one Jorge E. Jaramillo Excel Discussion (Misc queries) 7 November 3rd 08 11:29 PM
Joining numbered cells prefixed with zero Petee Excel Worksheet Functions 1 April 10th 08 04:52 PM
Joining letters from different cells Lance Excel Worksheet Functions 3 October 9th 05 06:05 PM
Joining text sungen99[_19_] Excel Programming 2 October 29th 04 08:01 PM
Joining text in multiple cells John Wilson Excel Programming 0 July 16th 03 07:45 PM


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