LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jc jc is offline
external usenet poster
 
Posts: 164
Default VBA help for functions


VBA help
to add tickmark to range that has data only trying this code
'Format the column to Add Ticks
Dim X As Variant

If WorksheetFunction.CountA(Range("E4:E2300")) 0 Then
If Len(X) 0 Then 'Find cells with data
X.FormulaR1C1 = Chr(39) & X.Text '39 is code for tick
Else
X.FormulaR1C1 = "" 'If empty do not put tick
End If
End If

end sub

This works but it takes too long to go through the range and when I have
19 sheets to have 1hr just to format too long

' Format the column to Add Ticks
' Dim Z As Variant, X As Variant
' 'Range("E4:E" & Lastrow).Select

' Range("E4").Select
' Range(Selection, Selection.End(xlDown)).Select

' Z = Selection.Address 'get the address
' For Each X In ActiveSheet.Range(Z) 'Do while
' If Len(X) 0 Then 'Find cells with data
' X.FormulaR1C1 = Chr(39) & X.Text '39 is code for tick
' Else
' X.FormulaR1C1 = "" 'If empty do not put tick
'End If
'Next

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula/functions for average and if functions Petu71 Excel Worksheet Functions 2 August 5th 07 08:25 PM
XL2003 FILTER FUNCTIONS VS. XL2007 FILTER FUNCTIONS RET70168 Excel Worksheet Functions 0 June 15th 07 01:00 AM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Looking for a site with functions that substitute the ATP functions Franz Verga Excel Worksheet Functions 3 June 24th 06 04:30 AM
Nesting functions in the functions dialog box cs170a Excel Worksheet Functions 0 June 10th 05 10:36 PM


All times are GMT +1. The time now is 07:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"