Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I currently place well names(B-07 3) in column A by resizing the cell but i realize the size isn't always 279 as in the second macro but is always the size range between y and x or y-x of the first macro. How can i set the second macro resize or paste range of the well the same range size as x and y fron the first macro. Trick
Sub Macro3( ' Macro3 Macr ' Macro recorded 2/24/2004 by Husky Use Dim z As Rang Sheets("Eclipse").Selec Range("A1").Selec Cells.Find(What:="time", After:=ActiveCell, LookIn:=xlFormulas, LookAt :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= False).Activat Cells.Find(What:="days", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) .Selec Set z = ActiveCel Cells(z.Row + 2, "B").Selec x = ActiveCell.Addres Selection.End(xlDown).Selec y = ActiveCell.Addres Range(x, y).Selec Application.CutCopyMode = Fals Selection.Cop Sheets("Sheet1").Selec Range("B2").Selec ActiveSheet.Past cLastRow = Cells(Rows.Count, "B").End(xlUp).Ro Cells(cLastRow + 1, "B").Selec ActiveSheet.Past cLastRow = Cells(Rows.Count, "B").End(xlUp).Ro Cells(cLastRow + 1, "B").Selec ActiveSheet.Past Sheets("Sheet2").Selec Range("B2").Selec ActiveSheet.Past cLastRow = Cells(Rows.Count, "B").End(xlUp).Ro Cells(cLastRow + 1, "B").Selec ActiveSheet.Past cLastRow = Cells(Rows.Count, "B").End(xlUp).Ro Cells(cLastRow + 1, "B").Selec ActiveSheet.Past cLastRow = Cells(Rows.Count, "B").End(xlUp).Ro Cells(cLastRow + 1, "B").Selec ActiveSheet.Past cLastRow = Cells(Rows.Count, "B").End(xlUp).Ro Cells(cLastRow + 1, "B").Selec ActiveSheet.Past Sheets("Sheet2").Selec Columns("B:B").Selec Selection.NumberFormat = "mm/dd/yy Sheets("Sheet1").Selec Columns("B:B").Selec Selection.NumberFormat = "mm/dd/yy End Su Sub Name_Format( ' Name_Format Macr ' Macro recorded 2/24/2004 by Husky Use Sheets("Sheet2").Selec Range("A2").Selec ActiveCell.FormulaR1C1 = "B-07 1 x = Cells(65536, "A").End(xlUp).Ro Cells(x, "A").Copy Cells(x, "A").Resize(279, 1 cLastRow = Cells(Rows.Count, "A").End(xlUp).Ro Cells(cLastRow + 1, "A").Value = "B-07 4 y = Cells(65536, "A").End(xlUp).Ro Cells(y, "A").Copy Cells(y, "A").Resize(279, 1 cLastRow = Cells(Rows.Count, "A").End(xlUp).Ro Cells(cLastRow + 1, "A").Value = "B-07 6 z = Cells(65536, "A").End(xlUp).Ro Cells(z, "A").Copy Cells(z, "A").Resize(279, 1 cLastRow = Cells(Rows.Count, "A").End(xlUp).Ro Cells(cLastRow + 1, "A").Value = "B-07 7 k = Cells(65536, "A").End(xlUp).Ro Cells(k, "A").Copy Cells(k, "A").Resize(279, 1 cLastRow = Cells(Rows.Count, "A").End(xlUp).Ro Cells(cLastRow + 1, "A").Value = "B-07 8 v = Cells(65536, "A").End(xlUp).Ro Cells(v, "A").Copy Cells(v, "A").Resize(279, 1 Sheets("Sheet1").Selec Range("A2").Selec ActiveCell.FormulaR1C1 = "B-07 2 a = Cells(65536, "A").End(xlUp).Ro Cells(a, "A").Copy Cells(a, "A").Resize(279, 1 cLastRow = Cells(Rows.Count, "A").End(xlUp).Ro Cells(cLastRow + 1, "A").Value = "B-07 3 b = Cells(65536, "A").End(xlUp).Ro Cells(b, "A").Copy Cells(b, "A").Resize(279, 1 cLastRow = Cells(Rows.Count, "A").End(xlUp).Ro Cells(cLastRow + 1, "A").Value = "B-07 5 c = Cells(65536, "A").End(xlUp).Ro Cells(c, "A").Copy Cells(c, "A").Resize(279, 1 End Su |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Macro deletes row in range, macro then skips the row moved up | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Macro to input formula in range based on another range | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |