Transfer Writen Notes

P

Pete

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:R696C6"

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top