VBA code

sorin1985

New Member
Joined
Feb 26, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi guys

In the bellow excel , if I fill the row in Items received and then put a date in column P it will trigger and cut and move the entire row to sheet ITEMS Collected . I am using this code bellow the picture and everything works fine . What i would like is to have column K in Items Received as a trigger as well and cut and move everything to Remote Storage Unit . The trigger can be a number or text or what ever .

Is it possible to add another code to the same sheet1 in VBA ?

Hope it make sense .
Thank you

items.PNG



1614358220409.png
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
At the end of your code you can add a new If Then.
If Not Intersect(Target, Range("rngTrigger2")) Is Nothing Then
...
End If
 
Upvote 0
At the end of your code you can add a new If Then.
If Not Intersect(Target, Range("rngTrigger2")) Is Nothing Then
...
End If
Hi Mart,thank you for replying.when you say end of my code,you mean after end sub?sorry ,i am really new in this.
 
Upvote 0
before end sub
Good morning Mart

Is not working .I have created 2 names under RgnDest2 and rngTrigger2 ,add them into the code ,but nothing. Could you please help me out ?Thank you
 
Upvote 0
Good morning Mart

Is not working .I have created 2 names under RgnDest2 and rngTrigger2 ,add them into the code ,but nothing. Could you please help me out ?Thank you
HI

I have tried again and now is giving me an RUN time error 1004.

1614583502312.png
 
Upvote 0
Have you changed If IsDate(Target) Then to something like: If Not IsEmpty(Target) Then
 
Upvote 0
Solution
rngDest2 is on sheet: Remote Storage Unit
 
Upvote 0
rngDest2 is on sheet: Remote Storage Unit
Nope still doesnt work .
so i have rngtrigger and rng trigger2 on item recieved columns P and K
rngdest on Item colected sheet (sheet 2 )
and rngdest2 on Remote storage sheet (sheet 4)

This vba is killing me :D
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,602
Members
449,089
Latest member
Motoracer88

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