How to Copy a row from sheet1 to sheet2 with "if statement"

francescoorsini

New Member
Joined
Oct 10, 2016
Messages
7
This below is the Sheet1

[TABLE="class: cms_table_grid, width: 500"]
<tbody>[TR]
[TD]Model[/TD]
[TD]Brand[/TD]
[TD]Status[/TD]
[TD]Quantity[/TD]
[TD]Minimal Quantity[/TD]
[/TR]
[TR]
[TD]a1[/TD]
[TD]Asus[/TD]
[TD]In stock[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]a2[/TD]
[TD]Sony[/TD]
[TD]In stock[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]a3[/TD]
[TD]Toshiba[/TD]
[TD]Test[/TD]
[TD]3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]a4[/TD]
[TD]Fujitsu[/TD]
[TD]Test[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]


I want to separate in different Sheet according to status.If status=In stock then copy the row and paste it to Sheet2.If status=Test copy the row and paste it to Sheet3.

This below will be Sheet2
[TABLE="class: cms_table_grid, width: 500"]
<tbody>[TR]
[TD]Model[/TD]
[TD]Brand[/TD]
[TD]Status[/TD]
[TD]Quantity[/TD]
[TD]Minimal Quantity[/TD]
[/TR]
[TR]
[TD]a1[/TD]
[TD]Asus[/TD]
[TD]In stock[/TD]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]a2[/TD]
[TD]Sony[/TD]
[TD]In stock[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



This below will be sheet3

[TABLE="class: cms_table_grid, width: 500"]
<tbody>[TR]
[TD]Model[/TD]
[TD]Brand[/TD]
[TD]Status[/TD]
[TD]Quantity[/TD]
[TD]Minimal Quantity[/TD]
[/TR]
[TR]
[TD]a3[/TD]
[TD]Toshiba[/TD]
[TD]Test[/TD]
[TD]3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]a4[/TD]
[TD]Fujitsu[/TD]
[TD]Test[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I understand that. But this is in violation of forum rules. I personally do not believe you can do what you want with just a formula. But I may be wrong.
 
Upvote 0

Forum statistics

Threads
1,226,730
Messages
6,192,711
Members
453,748
Latest member
akhtarf3

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