ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sort column A with "strike-through" values come first (https://www.excelbanter.com/excel-programming/283247-sort-column-strike-through-values-come-first.html)

William Poh Ben

sort column A with "strike-through" values come first
 

Hi EXCEL expert,

I have this problem I have been facing for a long time at work not abl
to sort the data in column A in order to have the cells containing th
"strike-through" values in column A appear first, follow by the value
without the "strike-through".

My column A consists of Part Numbers and the strike-through applies t
all letters/numbers in the cell, and not only certain letters/numbers.

Appreciate very much if someone can help me with a VBA code to solv
this problem

Thanks in advance

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Tom Ogilvy

sort column A with "strike-through" values come first
 
can you use a helper column?

You could create a UDF

Public Function IsStrikeThrough(rng As Range)
Application.Volatile
IsStrikeThrough = rng.Font.Strikethrough
End Function

Use this in an adjacent column and use that as the first sort key.

--
Regards,
Tom Ogilvy




"William Poh Ben" wrote in
message ...

Hi EXCEL expert,

I have this problem I have been facing for a long time at work not able
to sort the data in column A in order to have the cells containing the
"strike-through" values in column A appear first, follow by the values
without the "strike-through".

My column A consists of Part Numbers and the strike-through applies to
all letters/numbers in the cell, and not only certain letters/numbers.

Appreciate very much if someone can help me with a VBA code to solve
this problem

Thanks in advance !


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com