Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transfer Writen Notes
Hi Gang,
I have a pivot table that looks at sales and regional info. I want to have the ability to write notes periodically on certain accounts sorted out on the pivot table and then be able to transfer the notes to a master list once completed. The notes cell is outside the pivot table and the pivot table can change from user to user. It is too cumbersome to have the reps cycle throught the master list and insert notes so I thought I could write a simple macro that found the name of certain account and compared it to the master, once a match was found it would tab over to the notes cell (Off the pivot table sheet), copy the note, then find the same record in my master list, tab over to the notes cell and paste the copied info. It sounds so easy and it probably is, but I just can't get the macro to work correctly. This is what I have so far Sub Add_Notes_To_Master() Range("C5:C500").Select ActiveWorkbook.Names.Add Name:="Sorted", RefersToR1C1:= _ "='Sales By State'!R5C3:R500C3" Range("g5:g500").Select ActiveWorkbook.Names.Add Name:="Notes", RefersToR1C1:= _ "='Sales By State'!R5C7:R500C7" Sheets("CrosstabSales2_US$_RegionSalesR").Select Range("F2:F696").Select ActiveWorkbook.Names.Add Name:="Active_Accounts", RefersToR1C1:= _ "='CrosstabSales2_US$_RegionSalesR'!R2C6:R696C 6" Set MyFirstRange = Range("Active_Accounts") Set MySecondRange = Range("Sorted") Set MythirdRange = Range("Notes") fnd = 0 For Each c In MyFirstRange For Each n In MySecondRange For Each P In MythirdRange If P.Value = "" and c.value = n.value Then ActiveCell.Offset(0, 4).Copy Paste.n.Offset(0, 23).Value fnd = 1 End If Next Next Next Range("B2").Select End Sub Does someone have a better way of doing this or am I asking for too much? -- Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add notes | Excel Discussion (Misc queries) | |||
Notes / Handouts | Excel Discussion (Misc queries) | |||
t-shit transfer - transfer | Excel Discussion (Misc queries) | |||
Mail über Lotus Notes aus Excel heraus/ Sending Mail with Excel through Lotus Notes | Excel Programming | |||
Notes | Excel Discussion (Misc queries) |