vba - Excel add up values in one cell based on mutliple results from one look up value -


hope doing today! i've been working on spreadsheet tracks invoices , hours recorded each one. each invoice has multiple entries different numbers of hours each entry, same reference number combines project number , invoice number. example, invoice #1 of project cz23, reference number cz23-1. invoice 2 cz23-2, , on. located in column i, while hours located in column h in sheet named "document data".

now have sheet tracks hours called "summary". want have cell b28 of "summary" add hours cz23-1 "document data". since barely know vba, don't have code i'll display situation here:

reference

in case, cell b28 on "summary" 15 (all cz23-1 hours added up: 2+5+1+7), while b29 7 (all cz23-2 hours added up: 4+3) , on. doesn't have b28/b29, reference i've used cells. thank time - hope able explain well.

enter image description here enter image description here

best way create pivot table.

1. select cell inside data , on insert tab select pivottable.

2. "create pivottable" box pop-up. verify data captured in table/range. also, can choose if want have table appear on new sheet or existing sheet. enter image description here

3a. in "pivottable fields" box, can drag "reference" rows box , drag "hours" values box. should default sum , should add hours reference.

enter image description here

3b. values box default count. change sum, can select cell b4 or b5 (see below). right click , select value field settings. when "value field settings" box pops-up, can select sum on "summarize values by" tab.

enter image description here


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -