This is the real formula
=IF(I3="Original","Original",IF(I3<>"","RCC "&TEXT(I3,"000")&L3,""))
I sort by only one column at a time, the data that is selected does not include a header row.
This is my test formula
=""
it gives the exact same result as the longer actual formula.
I want the blanks or those looking like blanks to stay on the bottom.
In actual use the sorting is typically triggered by double-clicking on a header row (not included in the sort range) to trigger the sort. It alternates between ascending and descending using the code below
Sub sortem(R, k)
'sort range R by column k, alternate ascending and descending order
If ord = False Then
R.Sort Key1:=Range(k), Order1:=xlAscending, Header:=xlNo
Else
R.Sort Key1:=Range(k), Order1:=xlDescending, Header:=xlNo
End If
ord = Not ord
End Sub
When I have blanks, which I do in several columns, they stay on the bottom, where they belong. A couple columns have formulas that often return blanks (like the sample above) and they alternate between being on the top and on the bottom.
Thanks
Ken