Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Tue, 5 Aug 2003 07:58:50 -0700, "Dave Yeager"
wrote: 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? A Worksheet formula solution: =REPT(".",B1)&A1&REPT(".",32-B1-LEN(A1)) or with Names: =REPT(".",IndentCode)&Part&REPT(".",32-IndentCode-LEN(Part)) --ron |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Dave Yeager" wrote in message ...
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? Dave: assuming you have your part in cell C3 and your indent in cell D3, try the following : =REPT(".",D3)&C3&REPT(".",32-(LEN(TRIM(C3))+D3)) -Watjr |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format Issue | Excel Discussion (Misc queries) | |||
Time issue with Day Format | Excel Discussion (Misc queries) | |||
VLOOKUP/Index&Match data format issue | Excel Worksheet Functions | |||
Format Issue | Excel Worksheet Functions | |||
# format issue | Excel Discussion (Misc queries) |