Two sets of code on my spreadsheet, one won't run automatically while the other will

steve80s

New Member
Joined
Aug 18, 2022
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
Hi All,
A few months ago someone helped me create a Macro/Code for my spreadsheet. What happens is, on the 'Main Tab', when Y is entered on column R, the code automatically copies some data from this row to the 'Bloods Log'. This works perfectly. However, I set up the same thing for the 'SEN & LAC' tab. In this case, it should look for when Y is entered in column S, and then copy the information from that row to the same 'Bloods Log', so the 'Bloods Log' builds a list from both the 'Main Log' and 'SEN & LAC' tabs. Hope that makes sense!

Anyway, the code for the Main Log works perfectly whenever a Y is entered, but the code for the 'SEN & LAC' log won't run automatically. The only way I can get it to copy the data over to the 'Bloods Log' is for me to Run Macro from the menu.

Can someone please look at my draft (link below) and help fix this problem?

Thanks in advance!

My spreadsheet
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Your 'Main Log' sheet uses:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

your 'SEN & LAC' sheet is using:
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
 
Upvote 1
Solution
Your 'Main Log' sheet uses:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

your 'SEN & LAC' sheet is using:
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Easy as that! Thank you @johnnyL
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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