Migrating VBA code to an Excel workbook, require some help troubleshooting

Jacque de Lacy
Jacque de Lacy used Ask the Experts™
on
Hi,

An expert on EE has kindly prepared some code for me, however, I am trying to migrate it to a new workbook however it appears as though I haven't replicated it properly.

Would an expert kindly aid me to see what I've done wrong?

The VBA codes are located in:
a) Sheet 1: Private Sub Worksheet_Change(ByVal Target As Range)
b) Sheet 13: Private Sub Worksheet_Change(ByVal Target As Range)
c) Module 4: Sub FindSaleID()

Essentially the code works by a user selecting a 'Sale_No.' from the dropdown list in cell F2 of Worksheet 'eBay_Template ('eBay_T')', alongwith a 'Duration of Sale' in cell J3 and entering a 'Price' in K3.

By clicking on the Check Box, a 'Yes' or 'No' is recorded against the corresponding Sale_No. in Column N of Worksheet 'New_Inventory ('New_I')'.

The date and time is recorded in Column O each time Column N is updated.

Column P shows how many days have expired since Column O was last updated, and is updated daily.

Column Q shows the 'Duration of Sale' from cell J3 of Worksheet 'eBay_Template ('eBay_T')'.

Column R shows the difference between Column Q - Column P

Column S shows the 'Price' from cell K3 of Worksheet 'eBay_Template ('eBay_T')'

Kind Regards
Jacque
Auction-Catalogues-Inventory.xlsm
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015
Commented:
Hi Jacque,

You almost did it right except one line which made the difference.
I only changed one line of code to this.....

Set aDaysRng = Sheets("New_Inventory ('New_I')").Cells.Find(What:="Duration of Sale", LookIn:=xlValues)

Open in new window

Author

Commented:
Hi,

It worked! Thanks.

I would like some adaptations to the code, can I ask them here or open a new question?

Regards
Jacque
Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015

Commented:
It would be better if you open a new question with your new requirement.
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial