-
Challenging macro
Hi
I need assistance with a macro that well copy and paste "exact copy of formulas".........condition that the cursor has to be placed in the row that will be copied
Here is the question: say i have date in row 69 and column G (staring point)
I need a macro that will do the following steps:
1. Insert two rows below row 69 column G (this is were the cursor willbe placed) or a msg box indicate were to add the two rows from......
2. the first row that is added to format row height "fixd" to 9
3. second row stay the normal height
4. in the second row copy and paste all the forumla from row 69 into it.
5. the ability to repeat the steps - once the next end of month comes up...
6. copy all formulas from row 9 column G to last column....
-
Always happy to "assist".
Can you post the macro as you have developed it?
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
i have not even given it some thought on how to got about it............
still playing around with another macro......
i was wondering if the gurus on this forum could help....
-
Hi Keilah,
You're using words such as "assist" and "help", but what you're saying is, "Will someone create this code for me for free?" We expect questioners to do some work for themselves. See our FAQ
Regards
MD
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
hi....NOT ASKING FOR FREE.............
-
Sub copyover()
Dim ad As Range
Set ad = ActiveCell
Dim row, NewRow As Integer
Application.ScreenUpdating = False
row = 9.Row
Cells(1, row).Formula
Cells(1, row + 2).EntireRow.Insert Shift:=xldown
Cells(1, row).EntireRow.Copy
Cells(1, col + 1).Select
ActiveSheet.Paste
Application.ScreenUpdating = True
End Sub
Hi MD
this is how far i have got........i and now there are mistakes ....... still learning....
-
[VBA]Option Explicit
Sub NewMonth()
Dim c As Range
Set c = Cells(Rows.Count, 7).End(xlUp)
c.Offset(-1, -6).Resize(2, 1).EntireRow.Copy
c.Offset(1, -6).Insert Shift:=xlDown
c.Offset(2) = DateAdd("m", 2, DateSerial(Year(c), Month(c), 1)) - 1
Application.CutCopyMode = False
End Sub[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules