Numeric Cell Format

I regularly copy a table from Excel to a text file that has fixed width
I always have to adjust the numbers, however.

Can I specify a numeric format so that 1,000.00 is displayed like this and 
that any preceding zeros would be spaces.

eg, the following list of numbers would always line up to the right in a 
fixed width font

1,000.00
  100.00
   10.00
    0.00

Eddie
0
jeff.hall (4)
3/18/2008 3:39:00 PM
excel 39879 articles. 2 followers. Follow

2 Replies
327 Views

Similar Articles

[PageSpeed] 22

assuming the values you need to copy are in  column A you could add another 
column with the following formula
    =REPT(" ",8-LEN(TEXT(A1,"0.00"))) & TEXT(A1,"#,##0.00")
and copy down.

you would then use the newly created column to copy and paste into your text 
doc.


"Jeff Hall" <jeff.hall@eon-commerce.com> wrote in message 
news:memo.20080318153933.1060Y@eonsol.compulink.co.uk...
>I regularly copy a table from Excel to a text file that has fixed width
> I always have to adjust the numbers, however.
>
> Can I specify a numeric format so that 1,000.00 is displayed like this and
> that any preceding zeros would be spaces.
>
> eg, the following list of numbers would always line up to the right in a
> fixed width font
>
> 1,000.00
>  100.00
>   10.00
>    0.00
>
> Eddie 


0
Gerry3278 (36)
3/18/2008 4:32:48 PM
small error, formula should have been:
    =REPT(" ",8-LEN(TEXT(A1,"#,##0.00"))) & TEXT(A1,"#,##0.00")

Please let the group know if this did the trick

"GerryGerry" <Gerry@Gerry.anon> wrote in message 
news:Q8SDj.300762$3m6.58901@fe2.news.blueyonder.co.uk...
> assuming the values you need to copy are in  column A you could add 
> another column with the following formula
>    =REPT(" ",8-LEN(TEXT(A1,"0.00"))) & TEXT(A1,"#,##0.00")
> and copy down.
>
> you would then use the newly created column to copy and paste into your 
> text doc.
>
>
> "Jeff Hall" <jeff.hall@eon-commerce.com> wrote in message 
> news:memo.20080318153933.1060Y@eonsol.compulink.co.uk...
>>I regularly copy a table from Excel to a text file that has fixed width
>> I always have to adjust the numbers, however.
>>
>> Can I specify a numeric format so that 1,000.00 is displayed like this 
>> and
>> that any preceding zeros would be spaces.
>>
>> eg, the following list of numbers would always line up to the right in a
>> fixed width font
>>
>> 1,000.00
>>  100.00
>>   10.00
>>    0.00
>>
>> Eddie
>
> 


0
Gerry3278 (36)
3/18/2008 5:15:57 PM
Reply:

Similar Artilces:

Locate a cell, based on a criteria, then use the 'Cell' command...
I am using a pivot table to configure some data. In the first column, the pivot table of course displays only one instance of the text representing of data group. What I need to do is determine in which cell a particular item of text (i.e. the criteria) resides in. Once I can locate the cell where my 'criteria' text string resides, I can then use the CELL function to return the row number. My question is... what excel formula can I use to locate a cell in a single column range, where the cell contains the text = "XYZ" My eventual plan is to then use the following ...

Name cells before sort
Hi everyone I've a long list of clients, all with values. I have to count and sum them all but first i have to name them all. I'd like, if possible, to do a sort first and name it all and then put the list back how it was, but i loose the reference of the names. Any ideas? Tks in advance Pedro Hi Pedro, Try using a pivot table to summarize your data. For more help see: http://peltiertech.com/Excel/Pivots/pivotstart.htm http://www.cpearson.com/excel/pivots.htm http://www.contextures.com/xlPivot02.html http://www.contextures.com/xlPivot01.html http://www.ozgrid.com/Excel/excel-pivot...

Can I highlight a cell and link it to another workbook?
I need to highlight one cell and link it to another cell in a different workbook where I want to enter a text definition of the first cell. I don't think linking works because that just gives me the same information in a different cell. I want to be able to click on a cell in one worksheet and be able to "flip" to its definition in another worksheet. Thanks! -- Jenn Create a hyperlink... Click the cell you want to link so it is the active cell. Go to the Insert menu and choose 'hyperlink' In the hyperlink window select the 'Place in this Document' button...

Hidden Cells #4
How do you total the number of cells in a column without includnig the hidden cells in the same column? If the cells are hidden as a result of filtering, you could use something like: =SUBTOTAL(9,A2:A8) If you have manually hidden the rows, I don't know how you achieve what you want Regards Trevor "Helpme" <Helpme@discussions.microsoft.com> wrote in message news:EB29AD75-E25B-40EC-AB7D-5C9A6DADE6F3@microsoft.com... > How do you total the number of cells in a column without includnig the > hidden > cells in the same column? Trevor and Helpme. If row...

Numbering formate
I would like display baseball averages as three numbers with out a peroid. I formated the number as special by taking out the 0 from 0.386 to show .386, is there any way to have a number less that 1 be displayed as a whole number. Looking for 386. Thank you in advance. Hi Mike......... You can enter it as TEXT, by pre-formatting the cells as TEXT, or by typing a leading apostrople before the 386, Vaya con Dios, Chuck, CABGx3 "Mike Busch" <anonymous@discussions.microsoft.com> wrote in message news:1dcdc01c4546e$c3a85060$a401280a@phx.gbl... > I would like display ...

Using Logical OR on text in Conditional Formatting
I have a column with various text entries. I have created a conditional formatting rule for each type of entry but the formatting can be grouped together, so I would like a Conditional Formatting rule that says: If string contains "foo" or "bar" then colour red If string does not contain "yibble" or "wibble" then make bold etc. Any idea how I can do this rather thasn having to manage over 30 rules with each one looking for a single text entry type. Thanks Darius Try a formula of =OR(A2="foo",A2="bar") =AND(A2<>"y...

Open XLS file without it's number format using VBA?
An XLS file has been saved with it's numbers formatted to a specified number of decimal places. Using VBA how do you read in that XLS file with the numbers unformatted and with the original number of decimal places? Workbooks.Open (filename:="myFileName.xls", ????) Not sure what you mean by "read in". The values are still in the cells. If you open the workbook, then transfer the cell values from the worksheet to VBA, you'll get the entire number, not the version that is rounded for viewing purposes. On Wed, 06 Oct 2004 22:55:55 GMT, Dennis@NoSpam.com wrote: >...

directing the sum of a cell to either of two cells depending on va
I have a spreadsheet for working out hours worked that ends like this..... Total Hours _ Add Credit brought forward _ Deduct debit BF _ Total Hours for the week _ Less Standard hours - 36 Total _ What i need to do is forward this balance to another copy of this sheet using a formula that says if its a positive number then it goes to the credit cell but if its a negative number then it goes to the debit cell. Hope this makes sense. If not please ask - I need help. Thanks Debi Would 2 seperate "if" functions work for you. In the debit column put, "if&quo...

Using text in a cell in a formula
I need to have a formula use the text of adjacent cells to determine where to look for values. I want to grab data from multiple datasheets but I don't want to have to type the sheet name in every formula, I want the formula to grab the name of the sheet from an adjacent cell. i.e. I need a formula like =if(sheet1!B2>0,100,""), but I need a function that will fill in the sheet name from the text value of an adjacent cell that would have the sheet name in it as I will be doing this for multiple cells on the same sheet. see your other post -- Biff Microsoft...

how do I restrict cell input to dates only?
how do I restrict cell input to dates only? I want a message to be displayed informing the user that only dates are allowed in the cell. Try data|validation. On the settings tab, you can specify that the cell wants dates. James E Slack wrote: > > how do I restrict cell input to dates only? I want a message to be displayed > informing the user that only dates are allowed in the cell. -- Dave Peterson Have a look at Data > Validation Under the "Allow" drop down choose date -- Cutter ------------------------------------------------------------------------ Cutter&...

Removing text from cells
Hi, I have a spreadsheet with a list of reference numbers in column A. The numbers are like this. AAA/12345/Smith J Mr What I want to do is remove the text after the last / eg. Smith J Mr. I have thousands of cells I need to remove this on. Please help. Thanks. Hi Craig are all the entries the same number of characters for the first two sections, AAA/12345/ BBB/67890/ etc if so you can do this using a "helper" column - in column B type ==LEFT(A1,10) and then double click on the fill handle (bottom right hand side of cell) to fill down now copy column B click on A1 and ch...

Activating a sound alert on cell value
I have a excel book where I link on-line quotes from internet. HOW DO I SET UP AN ALERT TO ACTIVATE A SOUND WHEN THE CONTENT IN A CERTAIN CELL REACHES A PRE-DETERMINED VALUE? I have not worked with Visual basic before and its Excel 2003 Im using. Can anyone help please? (It would be great if the formula is in Swedish). Kind Regards, Sebastian Flyte ...

sum a cell value over 75
Please help!! Excel beginner! I need to build a formula that will add any remaining value over 75 in a cell. For example: In cell A1 = 76.5 In cell A2 - I need a formula that will sum anything over 75 and enter 1.5 into cell A2. Thanks in advance for everyone's help!! > For example: > In cell A1 = 76.5 > In cell A2 - I need a formula that will sum anything over 75 and enter 1.5 > into cell A2. Perhaps, as a start .. try in A2: =IF(A1>75,1.5,"") A2 will return 1.5 if A1 contains a number exceeding 75, otherwise A2 will just appear empty ("") -- ...

Allow VBA code to change a locked cell??
Hi, I am using Excel 2007. I have written some VBA code that sets the values in certain cells using code like the following: Worksheets("MySheet").Range("A5") = MyValue This code works when my worksheet is not protected and cell A5 is not locked. When I protect the worksheet (with A5 locked), my code does not work. I get run-time error '1004' - "The cell or chart that you are trying to change is protected and therefore read-only". I'd like to keep the cell locked (so users cannot edit it), but I do want my VBA code to be able...

Conditional Formating and SetFocus Question
Thanks in advace. This place has answered a lot of questions before I needed to ask. Now, I need to ask. I have a Continous Form [DetailSubForm] based on table [DetailTbl] that has the following fields. *[DetailID], [DocID], [CompDate],[SubDate], [ConfirmDate], and [ExpireDate]. The [DocID] field is a dropdown list that draws the data from the [TrainDocTbl]. I would like to use GetFocus to go to one of the Date fields depending on the selection made in [DocID]. It would also be nice to be able to declare the backcolor and forecolor of the whole record depending on that choice...

Links between cells
I have cells linked within my workbook so that I change a source tab and automatically update other tabs. The text updates fine. The color of target won't change when I update the source color. Any suggestions. Hi not possible in Excel. Even with VBA event macros not feasible -- Regards Frank Kabel Frankfurt, Germany "lsm" <lsm@discussions.microsoft.com> schrieb im Newsbeitrag news:D0940D5D-A044-4B50-945F-B5F749D0DAC7@microsoft.com... > I have cells linked within my workbook so that I change a source tab and > automatically update other tabs. The text updates...

Changing Names of Multiple Cell Link Ranges
I have a series of drop down boxes created with the Forms menu. The cell link range for each dropdown is different, as follows: Cell Link Box1 = DemandBase_A_UndistExp1 Cell Link Box2 = DemandBase_A_UndistExp2 Cell Link Box3 = DemandBase_A_UndistExp3 Cell Link Box...n = DemandBase_A_UndistExp...n I want to change them all at once to: DemandBase_A_OtherCost1 DemandBase_A_OtherCost2 DemandBase_A_OtherCost... I know I can change the entire name using the following code: Sub Change_Drop_Link() For Each bx In ActiveSheet.DropDowns If bx.LinkedCell = "DemandBase_A_UndistExp1" Then ...

cell formula
I have a cell formula i want to modify so it says "YES" if today is a monday and "No" if today is any other day of the week. =IF(B9="","YES","NO") at this stage it works if B9 is not empyy is this possible? thanks rslc Hi, How about this =IF(WEEKDAY(B9)=2,"Yes","No") -- Mike When competing hypotheses are...

Paste Formula that skips a cell.
I have a user that has received a file from a client that must not be altered apart from the required edits. The user has already discounted VLookup. The list from the client has two rows per "site". I need to paste a formula which looks to another file, this source file has only one row per "site". How can I paste the formula down the Client's site list but not have to edit the thousands of pasted formula to align the cells. eg. the paste into say client H4 is ok but client H6 should look to source H5, and client H5 will be blank, Client H8 will look to source H6....

Vlookup on 0 cell entry
Hi I have some vlookup formulas on looking at cells with a 0. I am getting a return of #n/a in the cells. I would like these to be blank. How do I do this please? Thanks Brian On Nov 13, 4:27 pm, "brian.bake...@googlemail.com" <brian.bake...@googlemail.com> wrote: > Hi > > I have some vlookup formulas on looking at cells with a 0. I am > getting a return of #n/a in the cells. I would like these to be blank. > How do I do this please? > > Thanks > > Brian Try this formula: =if(iserror(YOURFORMULA),"",YOURFORMULA) hth Carlo ...

Import "tab name" to cells
Hi. Is there a way to import the name of each tab to each worksheet? I'm creating a rather large worksheet and each workpaper needs to have the name of tab listed at the top. Please help!! Instead of using the Header/Footer option, I need to show the name of each tab in, for example, cell A1 of each w/b. Thanks. >-----Original Message----- >What do you mean? >You want to print them? > >"Stan" <stanyoo@yahoo.com> schreef in bericht >news:8db601c35b60$0b56c5d0$a001280a@phx.gbl... >> Hi. >> >> Is there a way to import the name of each ...

add a delivery report/read receipt to an excel cell
is it possible to add a delivery report/read receipt to a 2003 excel spreadsheet cell from an Outlook email With some custom VBA programming, you should be able to do this. -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://www.msoutlook.info/ Real World Questions, Real World Answers ----- "bishop bass" <bishop bass@discussions.microsoft.com> wrote in message news:98338893-D851-4767-A7A7-7460EB94B508@microsoft.com... > is it possible to ad...

0100 (24 hour) time
Hi, I wish to type in the cells 0100, 0200, 0300 etc but cannot see the format type that retains these numbers as four digits (allows me to go to 2400) . Which format is it - I have tried several and it drops the first zero(0) off. Cheers Mike You need to custom format the col as: hh:mm then enter the times with a colon, eg: 00:00 -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "MikeR-Oz" wrote: > I wish to type in the cells 0100, 0200, 0300 etc but cannot see the format > type that retains these numbers as four digits (allows me to go to 2400) ....

Plotting graph directly onto the cells
Is there a way to plot a graph directly onto the cells as shown: http://www.daveckw.net/Images/graph.JPG Your help is very much appreciated. Thank you. NO "DaveCKW" wrote: > Is there a way to plot a graph directly onto the cells as shown: > > http://www.daveckw.net/Images/graph.JPG > > Your help is very much appreciated. > Thank you. > ...

Printing sheets based on a cell value
I have a workbook of about 30 sheets; each sheet has a date in K4, the value of which varies from sheet to sheet. I'm hoping for a method to cycle through the workbook and print the pages for which K4 equals a specific date such as 12/31/09. I've tried to Name a 3-D selection (K4 on each sheet) without success. I have cycled through rows on a single sheet before but I don't know how to cycle through sheets and then look at 1 cell on each. Can anyone help? Thanks in advance. -- - markvi Hi Mark See http://www.rondebruin.nl/print.htm#every -- Rega...