I've been trying to pad cells in Excel and found a formula that seemed to work with a program called litLIB that popped up from googling this.
the formula was =RPAD("string",padlength,"padcharacter")
I have a spreadsheet with about 20 columns and I was hoping this formula could cross over into another worksheet
I tried something like =RPad(worksheetA.xls!$A$1,25," ") and that seems to be fine for one cell, but I cannot seem to copy it down the column as in =RPad(test.xls!$A$2, 25," ") =RPad(test.xls!$A$3,25," ") etc... automatically, instead I am stuck changing it for each one and I have about 3,000 rows.
Can I create a range from the first worksheet and place it in this formula? I've tried defining a range but I can't figure out exactly how to place it in the formula to get it to work.
Thanks for the help
In: =RPad(worksheetA.xls!$A$1,25," ")
note that the $'s are anchors. The one preceding the A anchors the column so that when dragging the formula to the right across columns, The formula maintains a fix on column A. The same is true of the one preceding the 1, it anchors/fixes the row at #1. So, remove the $/anchor from the row number:
=RPad(worksheetA.xls!$A1,25," ")
---
Ben Van Johnson
Thank you, that worked nicely
A follow-up q, when I pad a cell and then save it as a .txt(tab delimited) file and then open it up in notepad, it's adding tabs in between the cells. Any idea how I can not have this happen? Would be a great help.
Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks