help needed

badgerstrader

New Member
Joined
Mar 18, 2020
Messages
19
Office Version
  1. 2019
Platform
  1. Windows
ok so i have an excel sheet that has formulas in multiple cells. the formulas are all correct and working.
The excel workbook is linked into a data base that updates every few seconds and if all my criteria meet then excel is set to enter specific data into cells in one column it uses the below code.


Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Integer
Dim triggerRow As Integer
Dim tRng As Range
Dim mRng As Range
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
With ThisWorkbook.Worksheets("Triggers")
For r = 11 To 54
If Cells(r, 29) <> "" Then
triggerRow = Cells(r, 29) + 1
Set tRng = Range(.Cells(triggerRow, 1), .Cells(triggerRow, 3))
Set mRng = Range(Cells(r, 17), Cells(r, 19))
tRng.Copy
mRng.PasteSpecial xlPasteValues
If Cells(r, 17) = "CANCEL-ALL" Then Cells(r, 20) = "ALL" Else Cells(r, 20) = ""
If Cells(r, 17) = "" Then Cells(r, 29) = "" Else Cells(r, 29) = triggerRow
End If
Next
End With
Application.EnableEvents = True
End If
End Sub

my problem occurs when i have more than one cell in column AA with data in it.
is there someone that can take a look at the workbook for me in a view of correcting this.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Post your workbook to a CLOUD website for download. Make certain it does not contain confidential data.
 
Upvote 0
Post your workbook to a CLOUD website for download. Make certain it does not contain confidential data.
 
Upvote 0

Forum statistics

Threads
1,213,529
Messages
6,114,155
Members
448,554
Latest member
Gleisner2

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