
Originally Posted by
gratuitous1
Hi all, this is my first post. Here's my question:
I have a large sheet that is related according to rows. The columns are unimportant. There is likely an easy solution to this, but all I need to do is filter out all the blanks - basically squeeze the data from right to left. All I can think of is perhaps transposing the entire sheet, then filtering each column for non-blanks, but that would be very time consuming. I'm somewhat familiar with the advanced filter, but I'm not sure how I could use it here.
Are you saying that you have blank columns that you want to eliminate, shifting columns to the right of a blank column to the left?
If so then just use the sort, but sort by columns rather than rows. Sorting columns appears to be little used or even known functionality. To test for a blank column and mark it as such use something like:
If the column has no data you'll get a 99999 value, otherwise the number of the column. Convert all the formulae to values with a Copy...PasteSpecial Values, then select the whole range of data, choose Data Sort, but select the 'Left to Right' option, using the row where you've got your 99999 numbers as the key field.
HTH
Bookmarks