Combined column formatting

D

Dave Yeager

I have two columns of data: the first has parts
information, the second has an "indent code" (ranging
between 0-3). I want to create a third column of 32
characters that will take the first column's data and
apply a number of periods BEFORE the data equal to the
number in the indent code, then fill the remainder of the
cell with periods as well.

Example: The text "WHEEL" in the part column and the
number "2" in the indent column should
yield "..WHEEL....." (etc. until the total characters is
32).

Anybody know how I can pull this off? Are there formulas
I can apply to the third column to make this happen?

TIA,
Dave
 
J

Jason Morin

With part in col. A and indent code in col. B:

=REPT(".",B1)&A1&REPT(".",32-LEN(A1)-B1)

HTH
Jason
Atlanta, GA
 
D

Dave Yeager

Smashing. You are the man. Thanks!

-Dave
-----Original Message-----
With part in col. A and indent code in col. B:

=REPT(".",B1)&A1&REPT(".",32-LEN(A1)-B1)

HTH
Jason
Atlanta, GA

.
 

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