Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Please help with cut&paste to "Save As" problem!!

I have a complex spreadsheet that several people use. Some of the data
in the spreadsheet includes (with example values):

Region 15
District 345345
City Abilene
Budget # 1

When the user saves the spreadsheet, he is required to use all four of
these in the filename. In this case, it would be (15)345345Abilene_1.

This is somewhat awkward to type (they have hundreds of them to do), so
I used a formula to catenate all four of these cells into one. The data
in that cell reads exactly like the file name should:
"(15)345345Abilene_1."

My idea was to save them the trouble of typing in all that garbage.
They could just select this cell, hit "Save As" and paste it into the
filename box in the "Save As" window. The problem is, when they paste
it in, it adds a bunch of spaces at the end, before the ".xls." It
looks like:

(15)345345Abilene_1 .xls.

Can somebody PLEASE tell me how to prevent this? I've tried everything
short of killing my cat...(-;

For what it's worth, some of this data is in merged cells, including
the filename cell. I tried unmerging all of them and it had no effect.

Here's the formula I'm using, by the way. The data is in B1, D1, H1 and
T1. Just a simple ()&()&()&().... :

=("(")&(B1)&(")")&(D1)&(H1)&("_")&(T1)

What I'd REALLY like to have is just a button, where the user could
click it, and it would do a Save As with this filename, then close the
file, but I hate to beg. Just getting this idea to work would be great.

Thanks very much,

Ron M.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Please help with cut&paste to "Save As" problem!!


Here's the formula I'm using, by the way. The data is in B1, D1, H1 and
T1. Just a simple ()&()&()&().... :

=("(")&(B1)&(")")&(D1)&(H1)&("_")&(T1)


Ron, based on your output, I'll assume that there's a &".xls" at the
end of that formula.

To remove those extraneous blanks, use the trim function. My guess is
that T1 contains a string rather than a numeric 1. Your formula might
look like this:

=("(")&(B1)&(")")&(D1)&(H1)&("_")&TRIM(T1)&".xls "

You may judiously spread that trim to other B1, D1, or H1 if you like.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Please help with cut&paste to "Save As" problem!!

You have some more replies at your original post.

"Ron M." wrote:

I have a complex spreadsheet that several people use. Some of the data
in the spreadsheet includes (with example values):

Region 15
District 345345
City Abilene
Budget # 1

When the user saves the spreadsheet, he is required to use all four of
these in the filename. In this case, it would be (15)345345Abilene_1.

This is somewhat awkward to type (they have hundreds of them to do), so
I used a formula to catenate all four of these cells into one. The data
in that cell reads exactly like the file name should:
"(15)345345Abilene_1."

My idea was to save them the trouble of typing in all that garbage.
They could just select this cell, hit "Save As" and paste it into the
filename box in the "Save As" window. The problem is, when they paste
it in, it adds a bunch of spaces at the end, before the ".xls." It
looks like:

(15)345345Abilene_1 .xls.

Can somebody PLEASE tell me how to prevent this? I've tried everything
short of killing my cat...(-;

For what it's worth, some of this data is in merged cells, including
the filename cell. I tried unmerging all of them and it had no effect.

Here's the formula I'm using, by the way. The data is in B1, D1, H1 and
T1. Just a simple ()&()&()&().... :

=("(")&(B1)&(")")&(D1)&(H1)&("_")&(T1)

What I'd REALLY like to have is just a button, where the user could
click it, and it would do a Save As with this filename, then close the
file, but I hate to beg. Just getting this idea to work would be great.

Thanks very much,

Ron M.


--

Dave Peterson
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
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM
problem with Linking workbooks via "copy" and "paste link" Arkitek Excel Discussion (Misc queries) 0 December 19th 06 10:03 PM
Please help with cut&paste to "Save As" problem!! Ron M. Excel Discussion (Misc queries) 8 February 22nd 06 12:49 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Problem- Recording macros for "file save" and "File open" tritaco Excel Programming 1 April 22nd 04 06:15 PM


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