Excel Tips (Sept. 2004)
Function wwActiveCellName2() As String
On Error GoTo e1
wwActiveCellName2 = ActiveCell.Name.Name
Exit Function
e1:
wwActiveCellName2 = ""
End Function
Sub Test2()
Dim str1 As String
str1 = wwActiveCellName2
End Sub
strCriteria = "SchDate=#" & (Date) & "#" rscMe.MoveLast rscMe.FindFirst strCriteria If you press the Enter key, only B2 gets the formula. If you press Ctrl-Enter, you enter the relative reference: B2 gets =A2, B3 gets =A3, ... B20 get =A20. If you press Ctrl-Shift-Enter, you enter an array reference: B2:B20 all get {=A2} http://support.microsoft.com/default.aspx?scid=kb;en-us;161286 ACC2000: How to Use ADOX to Create and Refresh Linked Jet Tables http://support.microsoft.com/default.aspx?scid=kb;en-us;275249&Product=acc Basically, just replace the reference to Northwind with a call to the function that makes use of the Common Dialog tool above. If you don't want to use ADO, but rather DAO: http://www.mvps.org/access/tables/tbl0009.htm (this site also has really good sample code for using the comdlg32.dll api) More info on using the Common Dialog API: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnovba00/html/CommonDialogsPartI.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnima01/html/ima0187.asp Sub formatToPrint()
For each sh in Worksheets
With sh.PageSetup
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Cover page").Select
End Sub
Excel Menu: Insert, Name, Create, Check Left Side, Top Row. You will create 1xn range_names based upon the "label" in the first cell on the left. Now your second page should be =Intersect(range1, range2) where range1 is Indirect("mike"), range2 is Indirect("Total") or just "=range1 range2" cell.Value = WorksheetFunction.Proper(cell.Value) Next cell Insert two columns at C In the new C =Proper(A1) In the new D =Proper(B1) Select C1:D1, Copy Down. Select C:D, Copy, Paste Special Values. Inspect and edit. Delete Columns A:B For Each Rng1 In Worksheets("Sheet1").SpecialCells(xlCellTypeFormulas) Worksheets("Sheet2").Range(Rng1.Address).Formula = Rng1.Formula Next Rng1 [Chip Pearson - 8/12/2004 .excel.programming] Unique Rows will eliminate all duplicates. Then a Pivot table can count by date. [Rasey - 8/12/2004]
|
For questions or comments concerning content on this
website: Stephen Rasey |