Pasting data in cell adjacent to specific word

mozza90

New Member
Joined
Mar 19, 2015
Messages
32
Hi,

I a spreadsheet ("Sales") that tracks a total sales figure and each day is a new column. e.g. the below table.

ABCD
103/06/201804/06/201805/06/2018
2Sales50,00060,00065,000
3Costs10,00032,0004,000
........
.......
......
106Salesperson124,00029,00036,000
107Salesperson218,00018,50028,000

<tbody>
</tbody>


I need to find the last values in rows 106 and 107 and copy them into a workbook called "Daily Tracker 2018.xlsx" which is already open. The figures will be copied into the cell adjacent to the words Salesperson1 and Salesperson2. These words are always in column A, so the data will always be pasted into Column B but the row may vary over time.

So far I have the below, but I can't seem to find a way to search for the word Salesperson1 and paste the data into the adjacent cell. Any ideas on how to do this?

Code:
Dim Sales As Workbook
Dim Tracker As Workbook

Set Sales = Workbooks("Sales")
Set Tracker = Workbooks("Daily Tracker 2018")

Sales.Activate
Range("XFD106").Select
Selection.End(xlToLeft).Select
Selection.Copy

Tracker.Activate
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
How about
Code:
   Dim Fnd As Range
   
   Set Fnd = Range("A:A").Find("Salesperson1", , , xlWhole, , , False, , False)
   If Not Fnd Is Nothing Then Fnd.Offset(, 1).PasteSpecial
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,701
Messages
6,126,308
Members
449,308
Latest member
VerifiedBleachersAttendee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top