How to pull numbers from two tables with conditions?

A

Anna

I have 2 tables with identical number of lines. Both tables pulling
information from other sheets and other tables. They are summaries. Both of
them can have the same items listed, but, again, they might not. IF the items
appear in any one of those tables, the identical ones will be in the same
order.
Now, I need to do a summary of these 2 tables as well, in a third (lets call
it Total) table.
Since I do not know which one of the two tables will have the item listed,
but if they are, I need to sum the quantity sold in both, in addition to
listing them.
Here is a breakdown:
Column A - code, to identify the item
Column D - item description
Column E - quantity sold.
Table 1 begins on line 20, Table 2 begins on line 40, Table Total begins on
line 100
I use the following: if($A20>0,D20,D40) and
if($A100>0,E20+E40," ")
The problems I have are:
1. The second formula that calculated quantity should work only if column A
pulled a code, but it works at all times instead
2. The first formula, that suppose to pull an item description, only if the
item's code listed in the first table, and if not, in the second, pulls only
from the first table. So, if there is nothing, it lists nothing.

I really hope you can help me! It's been very frastrating!!
Thank you in advance!
 
A

Alok

Use this formula in E100
=sumif($A$1:$a$99,A100,$E$1:$E$99)
This will pull in the total sales from both tables as long as the A100 value
matches any value in A1:A99

Use this formula in D100
=VLOOKUP(A100,$A$1:$D$99,4,TRUE)
This will pull in the matching description from one of the tables.

Alok Joshi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top