View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
chris[_15_] chris[_15_] is offline
external usenet poster
 
Posts: 11
Default Newbie Frage: How to macro-out the daily numbers??

ok - sorry for replying late.
I can think of various solutions.

if you want to use a macro (not sure if I would) identify the active
range by:

Sub show_active_range()

Dim MyRange As Range
Dim No_of_Rows As Integer

Range("a1").Select 'this is were your range starts
Set ShiftRange = ActiveCell.CurrentRegion
No_of_Rows = ShiftRange.Rows.Count
MsgBox No_of_Rows 'gives you number of rows - inactivate when not
needed.

'You then need to continue writing something along the lines for each
row in active range etc and filter/delete data as wanted

End Sub

second method - ok, that might be a bit simple, but why not using the
advanced filter function with criteria sorting out the deleting for
you? You could then copy visible cells only.


third method (I think most elegant): make sure the data is named (will
probably come through as Query_From_FoxPro) then, in excel, import from
External data, new database query, Excel, and link to the current
range. With MsQuery you can set sql as wanted, which leaves you with
cleaned data.
Next time, just make sure th name includes all data, then goto Ms Query
and refresh data

Hope this is halpful - if you can send me an example, feel free to do so