I am hoping someone can help me out with a problem that I am having. I have a macro that I am working on in Excel 2003 right now that takes multiple fields from a spreadsheet and makes a text string. It was working great, until I had to add a few fields that were deemed necessary to have. I have two fields in the spreadsheet that contain text, never more than 4 characters long, and I need them to take up 6 spaces in my text string. I got this to work using the following:
StrOut = StrOut & StrDelim & Format(Cells(R, 33).Value, "@@@@@@") StrOut = StrOut & StrDelim & " " StrOut = StrOut & StrDelim & Format(Cells(R, 34).Value, "@@@@@@") StrOut = StrOut & StrDelim & " " While the bit of code above gives me the correct number of spaces, 6, the text is aligned on the right. I need to find out how to get the alignment on the left. Right now I have a ton of data not importing correctly because the system is specifically looking for these two bits of text to start on the right side. What can I do to get these left justified without having to do a ton of modifications to my existing code, since this is only a small portion of the string that is being written? Thanks for the assistance!! -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts