VB Code To Move Entire Row Based On Cell Contents

mantmit

New Member
Joined
Apr 22, 2014
Messages
1
I pull weekly alarm reports. Each alarm has a different "Process States". The states include: active, inactive, completed and pending. I only need to see the "Active" alarms.

The Process State is in column J.

The raw report looks like this. The report is anywhere from 40,0000 to 60,0000 entries long in any given week.


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O
[/TD]
[/TR]
[TR]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]Alarm 1[/TD]
[TD]##[/TD]
[TD][/TD]
[TD]Active[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[/TR]
[TR]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]Alarm 1[/TD]
[TD]##[/TD]
[TD][/TD]
[TD]Inactive[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[/TR]
[TR]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]Alarm 3[/TD]
[TD]##[/TD]
[TD][/TD]
[TD]Pending[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[/TR]
[TR]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]##[/TD]
[TD]Alarm 2[/TD]
[TD]##[/TD]
[TD][/TD]
[TD]Inactive[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[TD]#[/TD]
[/TR]
</tbody>[/TABLE]

In a best case scenario, I would have Sheet 1 be the raw report and then have Sheet 2 be only "Active" alarms.

I am aware I can sort the data and just copy it over but I want to explore the best/fastest possible way to do this each week.

I am messing around with the Formula: =IF(alarmhis!$J1="Active", alarmhis!A1,""). The issue with this is I have to copy it to every cell on the sheet to cover the 40,000 or so entries.

I thank anybody who can help or has any ideas about this at all.
 
Last edited:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Dear Friends
I am new on mrexcel..

My problem is same as above, as I want EXCEL to copy entire row to a new sheet having same headings like say sheet1.
I've synopsis data containing names of 500 students of different disciplines say, education, economics, computer science, psychology etc. upto 10 sheets... My sheets contains a column of above mentioned disciplines.
I actually want that when I put name of a students and his/her discipline, excel should copy entire row to their respective discipline's sheet.


Regards

An earliest help will be highly appreciated.
Thanks in advance
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,435
Members
452,326
Latest member
johnshaji

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