Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi :
I want this macro to give me the data in Columns B & C of a particular person in Column A on "Transactions" Worksheet and enter in it Q4 and R4 on the Named Worksheet. What happens is that it doesn't list all of the transactions for that person one underneath the other in Q4 and R4....it enters the first transaction in Q4 & R4 but the just enters the last transaction in Q44 & R44...with no transactions in between or underneath each other. Can someone help with this problem: Sub Transactions() ' ' Transactions Macro ' Macro recorded 6/23/2007 by Jeannie Vincovich ' ' Keyboard Shortcut: Ctrl+n ' Dim n As Integer, i As Integer Dim rng As Range Sheets("Transactions").Activate n = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To n Sheets("Transactions").Activate If Cells(i, "A").Value = "Jane Doe" Then Range("B" & i & ":C" & i).Copy Sheets("Jane D").Activate If Range("Q4") = "" Then Set rng = Worksheets("Jane D").Range("Q4") rng.Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Else Sheets("Jane D").Activate n = Cells(Rows.Count, "A").End(xlUp).Row + 1 Set rng = Worksheets("Jane D").Range("Q" & n) rng.Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End If End If Next i End Sub -- jeannie v |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checkbox value displays as text on the cell underneath it | Excel Discussion (Misc queries) | |||
macro needed to compare value and copy data underneath it to anoth | Excel Discussion (Misc queries) | |||
How do I shade the area underneath a curve | Excel Discussion (Misc queries) | |||
Title in one cell covering space of 3 cells underneath | Excel Worksheet Functions | |||
Data Val list Excel 97 fire macro | Excel Discussion (Misc queries) |