Can anyone please tell me how you determine the number format applied to a column in VBA? I specifically want to know if the "Text" format has been applied (e.g. via Format->Cells->Number in Excel 2003).
Hi Chris, welcome to the forum.
Cells have number formats, columns do not. You can loop through each cell in the column or a range and determine the NumberFormat property, though.
Any cell formatted as Text will return: @Code:Sub numFmt() Dim ce as Range For each ce in Range("E1:E10") MsgBox ce.NumberFormat Next ce End Sub
Hope that helps!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks