Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combing cells

I am trying to combine 2 cells with one of the cells
being right justified. Can't use the concatenate command
because my first cell may not be the same length
(characters) and the second cell has to be at the end.
Spacing will become a user problem and time consuming.
Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default combing cells

yes you can. length has nothing to do with it. and it will
cocatenate in the order you state. spaces can be added
=CONCATENATE(A2," ",B2)

-----Original Message-----
I am trying to combine 2 cells with one of the cells
being right justified. Can't use the concatenate command
because my first cell may not be the same length
(characters) and the second cell has to be at the end.
Spacing will become a user problem and time consuming.
Any help would be greatly appreciated.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default combing cells

Thanks for the quick response, but this still will be a
spacing problem. I have a description field that is
formatted to 40.29, must be a fixed width for an upload
to host, and only 39 characters long. Within that field,
the description maybe anywhere from 1-32 characters
leaving room for the userid. My other cell has a 7 digit
userid that has to start in positions 33-39. I want to
have one formula to attach the userid at the end of the
variable description field. This would be used for
1000's of lines within one spreadsheet, which is where
spacing is a problem. More or less, I need the opposite
of the "=right" command or "merge cell w/ specific
alignment".

4818005438233 abc1234
##4818005438233 abc1234

-----Original Message-----
yes you can. length has nothing to do with it. and it

will
cocatenate in the order you state. spaces can be added
=CONCATENATE(A2," ",B2)

-----Original Message-----
I am trying to combine 2 cells with one of the cells
being right justified. Can't use the concatenate

command
because my first cell may not be the same length
(characters) and the second cell has to be at the end.
Spacing will become a user problem and time consuming.
Any help would be greatly appreciated.
.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default combing cells

Kelly,

Try this:

You have 39 characters. You know the last 7 characters are the id.
That leaves you with 32 characters. Use the len function to find the length
of you varaible lenght string; i.e strleng=len(varlengstring)
32-strleng=number_of_spaces

To build the string that is you final goal(str_final) do this:

str_final=varlengstring
For i = 1 to number_of_spaces
str_final = str_final & Chr(32) 'Charcter 32 is the ANSI code for
space
Next
str_final=str_final & id



" wrote:

Thanks for the quick response, but this still will be a
spacing problem. I have a description field that is
formatted to 40.29, must be a fixed width for an upload
to host, and only 39 characters long. Within that field,
the description maybe anywhere from 1-32 characters
leaving room for the userid. My other cell has a 7 digit
userid that has to start in positions 33-39. I want to
have one formula to attach the userid at the end of the
variable description field. This would be used for
1000's of lines within one spreadsheet, which is where
spacing is a problem. More or less, I need the opposite
of the "=right" command or "merge cell w/ specific
alignment".

4818005438233 abc1234
##4818005438233 abc1234

-----Original Message-----
yes you can. length has nothing to do with it. and it

will
cocatenate in the order you state. spaces can be added
=CONCATENATE(A2," ",B2)

-----Original Message-----
I am trying to combine 2 cells with one of the cells
being right justified. Can't use the concatenate

command
because my first cell may not be the same length
(characters) and the second cell has to be at the end.
Spacing will become a user problem and time consuming.
Any help would be greatly appreciated.
.

.


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
Combing 2 lists of data bookman3 Excel Discussion (Misc queries) 2 April 23rd 09 06:11 AM
Combing cells and entering them in a different workbook dpwicz Excel Discussion (Misc queries) 1 September 16th 08 08:30 AM
Formula Help Combing two AND statements Yogi_Bear_79 Excel Worksheet Functions 1 June 7th 05 07:35 PM
Combing Workbooks GazMo[_6_] Excel Programming 1 October 20th 04 01:53 AM
Combing Workbooks GazMo[_5_] Excel Programming 1 October 19th 04 03:45 AM


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