Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default adding to an entire worksheet

I have a worksheet that is exported from another source, and the signs in it
are trailing.

I need to get the signs to be proper for Excel to handle them. Currently,
they're numbers like 123 and 99-.

I thought that you could add a signed number, like a +0 to the contents of a
spreadsheet, and make it come out right, but cannot find out how to do that
in the version of excel I am using.

Is there a way to convert this on import, or is there a macro or other set
of menu commands that Microsoft seemingly has hidden from me?

Thanks

S



  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,824
Default adding to an entire worksheet

If you're using xl2002, there's an option under the data|Import wizard that says
to treat trailing minuses as negatives.

(It's under the advanced tab under step 3)

This was posted by Dana DeLouis:

Sub TrailingMinus()
' = = = = = = = = = = = = = = = =
' Use of CDbl suggested by Peter Surcouf
' Program by Dana DeLouis,
' = = = = = = = = = = = = = = = =
Dim rng As Range
Dim bigrng As Range

On Error Resume Next
Set bigrng = Cells.SpecialCells(xlConstants, xlTextValues).Cells
If bigrng Is Nothing Then Exit Sub

For Each rng In bigrng.Cells
rng = CDbl(rng)
Next
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Steve Chatham wrote:

I have a worksheet that is exported from another source, and the signs in it
are trailing.

I need to get the signs to be proper for Excel to handle them. Currently,
they're numbers like 123 and 99-.

I thought that you could add a signed number, like a +0 to the contents of a
spreadsheet, and make it come out right, but cannot find out how to do that
in the version of excel I am using.

Is there a way to convert this on import, or is there a macro or other set
of menu commands that Microsoft seemingly has hidden from me?

Thanks

S


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default adding to an entire worksheet

If you're using an older version of XL, and you wish to use a function,
since you did cross-post to the Functions Group also, you could try this in
an adjoining column and copy down:

=IF(ISERROR(A1*1),LEFT(A1,LEN(A1)-1)*-1,A1)

--


HTH,

RD
========================================
Please keep all correspondence within the Group, so all may benefit!
========================================


"Steve Chatham" wrote in message
...
I have a worksheet that is exported from another source, and the signs in

it
are trailing.

I need to get the signs to be proper for Excel to handle them. Currently,
they're numbers like 123 and 99-.

I thought that you could add a signed number, like a +0 to the contents of

a
spreadsheet, and make it come out right, but cannot find out how to do

that
in the version of excel I am using.

Is there a way to convert this on import, or is there a macro or other set
of menu commands that Microsoft seemingly has hidden from me?

Thanks

S





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
Adding Headers and Footer to an Entire Workbook?? Spyder Excel Discussion (Misc queries) 5 February 25th 10 03:46 PM
How to reference entire worksheet in new worksheet mmonti Excel Worksheet Functions 0 September 7th 09 08:28 PM
converting entire worksheet to pdf annoni Excel Discussion (Misc queries) 0 August 12th 08 07:09 PM
Sum only adding rows on page instead of entire spreadsheet - help Sarah Excel Discussion (Misc queries) 1 February 15th 06 11:46 PM
adding ".jpg" to an entire column GaryK Excel Discussion (Misc queries) 6 August 4th 05 07:48 AM


All times are GMT +1. The time now is 07:43 AM.

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"