Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combing 2 lists of data | Excel Discussion (Misc queries) | |||
Combing cells and entering them in a different workbook | Excel Discussion (Misc queries) | |||
Formula Help Combing two AND statements | Excel Worksheet Functions | |||
Combing Workbooks | Excel Programming | |||
Combing Workbooks | Excel Programming |