Copying Data to next available row in other sheet

DubRed

Board Regular
Joined
Mar 25, 2005
Messages
97
I would really appreciate someone's help with something I've been stuck on for the last day and a half.

In sheet1! i have three columns:
col A - Client Name
col B - Project Name
col C - Project Type

There are 3 project types - Design, Development and Marketing. All new sales are added one below the other in sheet1!

As a new sale is added in sheet 1 i would like the client name (col A) and Project Name (col B) to be copied to the next available row in sheet2! if the project type is development.

Anyone any ideas?

Thanks a mill
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Have a look at this.

Sheet 1: Data
Book1
ABCD
1CompanyProject Name
2ABCDevelopment
3DEFM1
4GHIM2
5JKLJ2
6MNODevelopment
7PQRM4
8STUDevelopment
9VWXF1
Sheet1


Sheet 2: Results
Book1
ABCD
1CompanyProject Name
2ABCDevelopment
3MNODevelopment
4STUDevelopment
5  
6  
7  
8  
9  
Sheet2


Fromula in A2:
=IF(ROW(Sheet1!$A2)-ROW(Sheet1!$A$1)>COUNTIF(Sheet1!$B$1:$B$9,"Development"),"",INDEX(Sheet1!$A$1:$A$9,SMALL(IF(Sheet1!$B$1:$B$9="Development",ROW(Sheet1!$A$1:$A$9)),ROW(Sheet1!$A2)-ROW(Sheet1!$A$1))))

Formula in B2:
=IF(ROW(Sheet1!$A2)-ROW(Sheet1!$A$1)>COUNTIF(Sheet1!$B$1:$B$9,"Development"),"",INDEX(Sheet1!$B$1:$B$9,SMALL(IF(Sheet1!$B$1:$B$9="Development",ROW(Sheet1!$A$1:$A$9)),ROW(Sheet1!$A2)-ROW(Sheet1!$A$1))))

These formulas are confirmed with CTRL+SHIFT+ENTER instead of just Enter.
Then copied down as far as you need. You will need to adjust the ranges to suit.

Note: The formula in B2 could simply be =If(A2<>"",Vlookup(A2,Sheet2!A2:B9,2),"") for a little more efficiency.
 
Upvote 0

Forum statistics

Threads
1,203,026
Messages
6,053,114
Members
444,639
Latest member
xRockox

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