Advertisement

09.06.2007 at 04:53PM PDT, ID: 22812344
[x]
Attachment Details

Padding spaces in Excel cells

Asked by christiemhjohnson in Access Coding/Macros, Microsoft Excel Spreadsheet Software, Spreadsheet Software

Tags: excel, padding, spaces

I'm writing a Microsoft Excel Macro that copies information from one sheet in a workbook to another and concatenates the values to create a single string.   The string is then used in a batch file to upload to a mainframe system.

 I have one issue where one of the fields (JVNumber)  is not always a set amount of spaces.  The field can range from having 4-8 characters.  When I copy and paste that value in my spreadsheet, is there a way that I can pad the spaces a certain amount.  After the field JVNumber which is in place 32, the next field is not until space 50.  Any approach would be really helpful.

I really need help and can confirm you will get 500 points and an A.

Thanks!

After that field on my string, I have another Start Free Trial
 
Loading Advertisement...
 
[+][-]09.06.2007 at 04:59PM PDT, ID: 19844556

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Microsoft Excel Spreadsheet Software, Spreadsheet Software
Tags: excel, padding, spaces
Sign Up Now!
Solution Provided By: byundt
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.06.2007 at 05:04PM PDT, ID: 19844570

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2007 at 06:30PM PDT, ID: 19844829

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628