VBA- Move Row to Another Sheet Based on Text- Multiple Sheets

sbentley

New Member
Joined
Sep 18, 2019
Messages
1
Hello,

Forgive me, this is my first time working with VBA. I have done my fair share of Googling but have not found a solution. I am trying to get my workbook to move an entire row of data from one sheet to another based on the text found in a column. I was able to figure this out- to an extent. Currently my workbook will move the row (and delete the empty row) to a sheet titled "Complete" if "Delivery Scheduled" is entered in column AJ.

Question: Is it possible to have the text in column AJ determine which sheet the row moves to with each selection moving to a different sheet?

Example: The first sheet would contain a list of files and have an outcome status entered in column AJ by the user.
The data entered here would determine what sheet the row would move to (with each selection routing to a separate sheet).


[TABLE="width: 500"]
<tbody>[TR]
[TD]Text entered into column AJ:[/TD]
[TD]Sheet Title row is moved to:[/TD]
[/TR]
[TR]
[TD]Delivery Scheduled[/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]Intake Prep[/TD]
[TD]Intake Prep[/TD]
[/TR]
[TR]
[TD]IV[/TD]
[TD]IV[/TD]
[/TR]
</tbody>[/TABLE]

Is this possible? Thank you in advance!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
There are several ways to do it. You can do it all with code by using a Select Case algorithm or you can use a helper column where you list the destination sheet on the corresponding row to the value in column AJ and simply refer to that range value, eg. If col AK listed the destination sheet and cell AJ25 had 'Delivery Scheduled' value Then
Code:
Range("A25:AJ25").Copy Sheets(Range("AK25").Value).Cells(Rows.Count, 1).End(xlUp)(2)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,022
Latest member
RobertV1609

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