Please help with cut&paste to "Save As" problem!!

R

Ron M.

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.
 
R

Rajah

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top