deepakgoyal2005
Board Regular
- Joined
- Sep 1, 2008
- Messages
- 58
Hi,
I have an excel sheet with data of variable lengths in different column.
I need an aligned data in a text file. So I tried turning the data into fixed width with following formula in Column D4,
Where,
Column A is a number
Column B is Text of maximum 40 characters
Cloumn C is amount field
Then, manually copy and paste the column with formula into a text file for final output. I want to avoid these steps being done by other teammates manually and avoid manual errors. So, want to do it through VBA Macro. Also since my data starts with Row 4 in excel sheet, I want to skip first 3 rows.
I, being not much comfortable with VBA, Can anyone please suggest something in this regards.
Thanks in advance
I have an excel sheet with data of variable lengths in different column.
I need an aligned data in a text file. So I tried turning the data into fixed width with following formula in Column D4,
Code:
TEXT(A4,"00000") & B4 & REPT(" ",40-LEN(B4)) & TEXT(C4,"0000000.00")
Where,
Column A is a number
Column B is Text of maximum 40 characters
Cloumn C is amount field
Then, manually copy and paste the column with formula into a text file for final output. I want to avoid these steps being done by other teammates manually and avoid manual errors. So, want to do it through VBA Macro. Also since my data starts with Row 4 in excel sheet, I want to skip first 3 rows.
I, being not much comfortable with VBA, Can anyone please suggest something in this regards.
Thanks in advance