Move entire row to another row based on a cell value

ANTJONZ

New Member
Joined
Jun 27, 2018
Messages
2
Hello everyone. I need a code that will move specific rows to other rows in the same sheet based on a Cell Value. My spreadsheet has 4 sections (high risk, medium risk, low risk, completed). In column "J" of each section will be a number or a letter. Any number less than 3 is high risk, 3-7 is medium risk, 8 and above is low risk, the letter C is completed. My values for each row are located in C through M. My request is, anytime the value in cell J changes, I need that row range to move into the appropriate "risk" row range on the spreadsheet. Each "risk" section has a range of rows, but the range can be expanded or made smaller based on the number of Risk rows that meet the criteria. Please let me know if more clarity is needed. Thanks 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,)
Hi ANTJONZ, welcome to the forum. It would be pretty easy to write a macro for most of what you describe, except for the removing of the row from one category and moving it to a different one. That is because as you add or delete rows within the category areas, the starting and ending row numbers change for all but the starting row of the first category. But, if you have a header at the beginning of each section of categories in a specific column that could be used to locate the beginning row of that category and a macro could be developed. We would still need to know if the data in C:M for the category starts on on same row as the section header or if it is offset and by how many rows if it is offset. If you can provide that additional information I will try to fix you up with a macro to do what you want.
 
Last edited:
Upvote 0
I tried to respond to your PM but got a message saying the mail box is full. That is odd since you only show one post. At any rate I do not accept any personal emails for issues that originate on this forum because it deprives the other members of the abiltiy to participate. You can click on the word Attachments in large orange letters below and it will take you to other links that explain how to attach images in these threads. One simple way is to make an example on an Excel sheet, highlight it, right click then use the borders icon to put borders around all the highlighted cells. Then copy that range and paste it into the thread reply pane.
 
Upvote 0
Let's give this a try....

[TABLE="width: 1928"]
<colgroup><col span="8"><col><col span="2"><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD="colspan: 11"]SUMMER REPORT[/TD]
[TD]April 18, 2019[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]LOCATION[/TD]
[TD]BASE/OSR[/TD]
[TD]TYPE[/TD]
[TD]VISIT TYPE[/TD]
[TD]#REMAINING[/TD]
[TD]LINE END DATE[/TD]
[TD]OWED TO SCHEDULE[/TD]
[TD]BUFFER[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]HIGH RISK (<3 DAYS OF CONTINGENCY)[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/22/19[/TD]
[TD]05/22/19[/TD]
[TD]0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/22/19[/TD]
[TD]05/22/19[/TD]
[TD]0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/26/19[/TD]
[TD]06/07/19[/TD]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/30/19[/TD]
[TD]04/30/19[/TD]
[TD]0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/15/19[/TD]
[TD]06/15/19[/TD]
[TD]0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/14/19[/TD]
[TD]06/15/19[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/22/19[/TD]
[TD]05/22/19[/TD]
[TD]0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/30/19[/TD]
[TD]05/31/19[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/30/19[/TD]
[TD]04/30/19[/TD]
[TD]0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/06/19[/TD]
[TD]06/07/19[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/09/19[/TD]
[TD]06/07/19[/TD]
[TD]-2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/04/19[/TD]
[TD]06/07/19[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/04/19[/TD]
[TD]06/07/19[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/05/19[/TD]
[TD]06/07/19[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD="colspan: 13"] [/TD]
[/TR]
[TR]
[TD]MEDIUM RISK (3 -7 DAYS OF CONTINGENCY)[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/25/19[/TD]
[TD]05/31/19[/TD]
[TD]6[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/31/19[/TD]
[TD]06/07/19[/TD]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/08/19[/TD]
[TD]06/15/19[/TD]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/08/19[/TD]
[TD]06/15/19[/TD]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/02/19[/TD]
[TD]06/07/19[/TD]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/27/19[/TD]
[TD]06/30/19[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/14/19[/TD]
[TD]05/20/19[/TD]
[TD]6[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/10/19[/TD]
[TD]05/15/19[/TD]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/19/19[/TD]
[TD]05/23/19[/TD]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/02/19[/TD]
[TD]06/07/19[/TD]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/10/19[/TD]
[TD]06/15/19[/TD]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/26/19[/TD]
[TD]04/30/19[/TD]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/26/19[/TD]
[TD]04/30/19[/TD]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/31/19[/TD]
[TD]06/07/19[/TD]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD="colspan: 12"] [/TD]
[/TR]
[TR]
[TD]MINIMAL/LOW RISK (>8 DAYS OF CONTINGENCY)[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/03/19[/TD]
[TD]06/15/19[/TD]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/19/19[/TD]
[TD]05/31/19[/TD]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/21/19[/TD]
[TD]06/07/19[/TD]
[TD]17[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/29/19[/TD]
[TD]06/07/19[/TD]
[TD]9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/30/19[/TD]
[TD]06/07/19[/TD]
[TD]8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/16/19[/TD]
[TD]04/24/19[/TD]
[TD]8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/21/19[/TD]
[TD]04/30/19[/TD]
[TD]9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/28/19[/TD]
[TD]06/07/19[/TD]
[TD]10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/26/19[/TD]
[TD]05/15/19[/TD]
[TD]19[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/26/19[/TD]
[TD]06/07/19[/TD]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]06/01/19[/TD]
[TD]06/15/19[/TD]
[TD]14[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]07/06/19[/TD]
[TD]07/15/19[/TD]
[TD]9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/02/19[/TD]
[TD]05/15/19[/TD]
[TD]13[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/11/19[/TD]
[TD]06/07/19[/TD]
[TD]27[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD="colspan: 13"] [/TD]
[/TR]
[TR]
[TD]COMPLETED[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]03/24/19[/TD]
[TD]04/14/19[/TD]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]03/28/19[/TD]
[TD]04/03/19[/TD]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]04/10/19[/TD]
[TD]04/14/19[/TD]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 2"] [/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

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