A little help needed

Pretty Vacant

New Member
Joined
May 18, 2015
Messages
31
Morning all,

I have a spreadsheet with a list of tasks and their costs. I would like to be able to manually put in a quantity against some of the tasks and populate a summary sheet on a separate worksheet.
So,
I have a list of tasks as below:(up to about 650 rows)
[TABLE="width: 233"]
<tbody>[TR]
[TD]code[/TD]
[TD] Task [/TD]
[TD]Amount[/TD]
[TD]Cost[/TD]
[/TR]
[TR]
[TD]1B.001.01[/TD]
[TD]Task A[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]150[/TD]
[/TR]
[TR]
[TD]1B.001.02[/TD]
[TD]Task B[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]1B.001.03[/TD]
[TD]Task C[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]1B.001.04[/TD]
[TD]Task D[/TD]
[TD] [/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD]1B.001.05[/TD]
[TD]Task E[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]25[/TD]
[/TR]
[TR]
[TD]1B.001.06[/TD]
[TD]Task F[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]35 [/TD]
[/TR]
</tbody><colgroup><col><col><col span="2"></colgroup>[/TABLE]

and I'd like to end up with something like below on a separate worksheet:
[TABLE="width: 297"]
<tbody>[TR]
[TD]code [/TD]
[TD] Task[/TD]
[TD] Amount [/TD]
[TD]Cost [/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]1B.001.01[/TD]
[TD]Task A[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]150[/TD]
[TD="align: right"]150[/TD]
[/TR]
[TR]
[TD]1B.001.02[/TD]
[TD]Task B[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD]1B.001.03[/TD]
[TD]Task C[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]1B.001.05[/TD]
[TD]Task E[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]25[/TD]
[/TR]
[TR]
[TD]1B.001.06[/TD]
[TD]Task F[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]35[/TD]
[/TR]
</tbody><colgroup><col><col><col span="3"></colgroup>[/TABLE]

Can anybody assist me with this? Any help is gratefully received.

P
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Is this what you're after
Code:
Sub Copysht()
' Pretty Vacant

    ActiveSheet.Copy Before:=Sheets(1)
    ActiveSheet.Name = "New"
    Columns(3).SpecialCells(xlBlanks).EntireRow.Delete
    Range("E1").Value = "Amount2"
    Range("E2").Formula = "=C2*D2"
    Range("E2", Range("D" & Rows.Count).End(xlUp).Offset(, 1)).FillDown
    
End Sub
 
Upvote 0
Thank you for your post.

It doesn't quite do what I'm after which is probably down to me not explaining it properly.

The second sheet will be a summary of the first. So there is a table formatted exactly the same as Sheet 1 but unpopulated. I want to be able to manually enter a quantity against tasks in sheet 1 and the task name (B1:B650) and those tasks pop up in the table in sheet 2. so there could be 30 or 40 tasks out of the original 650 that have a quantity assigned to them that would need to be replicated in Sheet 2.

not sure if this is explaining it right but I'm grateful for any help

P
 
Upvote 0
Hi, is the "code" a unique identifier for each row?


Excel 2013/2016
ABCDEFG
1codeTaskAmountCostHelper:5
21B.001.01Task A1150
31B.001.02Task B2200
41B.001.03Task C1100
51B.001.05Task E125
61B.001.06Task F135
7
8
9
Sheet1
Cell Formulas
RangeFormula
A2=IF(ROWS($A$2:A2)>$G$1,"",INDEX(Sheet2!$A$2:$A$1000,AGGREGATE(15,6,(ROW(Sheet2!$A$2:$A$1000)-ROW(Sheet2!$A$2)+1)/(Sheet2!$C$2:$C$1000<>""),ROWS(A$2:A2))))
B2=IF(A2="","",VLOOKUP($A2,Sheet2!$A$2:$D$1000,2,0))
C2=IF(B2="","",VLOOKUP($A2,Sheet2!$A$2:$D$1000,3,0))
D2=IF(C2="","",VLOOKUP($A2,Sheet2!$A$2:$D$1000,4,0))
G1=COUNTIF(Sheet2!$C$2:$C$1000,"<>")
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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