LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
Corey
 
Posts: n/a
Default Add spaces for specific fields to paste in

Thanks to both of you. This worked great.

"Pete" wrote:

The middle part of this doesn't quite do what the OP asked for. I've
assumed the data is in Sheet1 columns A to C with a header row so the
data starts at A2. Insert a new worksheet and enter the following
formula in A2:

=Sheet1!A2&REPT(" ",19-LEN(Sheet1!A2))

In B2 you should enter the following formula:

=IF(Sheet1!B2<0,REPT("
",12-LEN(ABS(Sheet1!B2*100))-1)&ABS(Sheet1!B2*100)&"-",REPT("
",12-LEN(ABS(Sheet1!B2*100))-1)&ABS(Sheet1!B2*100)&" ")

And in C2 of Sheet 2 you should enter the following formula:

=REPT(" ",6-LEN(Sheet1!C2))&Sheet1!C2

I wasn't sure if you wanted three separate fields, or for them to be
joined together separated by a period. If the latter, you can enter the
following in cell D2:

=A2&"."&B2&"."&C2

Copy these formulae down for as many rows as you have data in Sheet 1.
You can fix the values by selecting all the cells, Click <copy then
Edit | Paste Special | Values | OK and <esc, then copy/paste into your
accounting package. Alternatively, you can drag Sheet2 away from the
main window and use File | Save As to give it a different name and a
format to suit your other package, eg csv or dbf, so that you could
then import it.

Hope this helps

Pete


 
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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
RECORDED MACRO PASTE'S DATE DIFFERENTLY TO MANUAL PASTE Pauldecan Excel Worksheet Functions 0 June 23rd 05 05:45 PM
paste special | values should work with merged cells PastingSpecial Excel Discussion (Misc queries) 1 June 20th 05 06:51 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM
Sorting Spreadsheet with Merged Fields Linda L Excel Discussion (Misc queries) 1 January 22nd 05 12:58 AM


All times are GMT +1. The time now is 02:45 PM.

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"