SUM of Unique Values from 2 columns

thewiseguy

Well-known Member
Joined
May 23, 2005
Messages
1,015
Office Version
  1. 365
Platform
  1. Windows
Hi all. I am using the following formula:

=LET(sh,VSTACK(Input!AD4:AD502,Input!AG4:AG502),SORT(UNIQUE(FILTER(sh,(sh <>"")*(sh<>0),""))))

This is giving me unique values from columns AD and Ah (from "Input" sheet)

Now I am trying to get the total quantities associated with these 2 columns. Column AD has qty in AE and column AG has qty is AH

v2023.10 - Copy.xlsm
ADAEAFAGAH
3Accessory NameQTYProductAccessory NameQTY
4MAXLITE External Adapter Round, White1AccessoryMAXLITE Battery backup for Type C Linears3
5MAXLITE External Adapter Round, White1AccessoryMAXLITE Battery backup for Type C Linears3
Input


Can anyone help with this?

Many thanks in advance!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about
Excel Formula:
=SUMIFS(input!AE4:AH502,input!AD4:AG502,A2#)
change the A2# to refer to the cell with your formula.
 
Upvote 0
Yours is much more simple. I changed the columns a bit but this was what I used:

=SUMPRODUCT((Input!$Z$7:$Z$506='Accessories (BOM)'!B6)*Input!$AA$7:$AA$506)+SUMPRODUCT((Input!$AC$7:$AC$506='Accessories (BOM)'!B6)*Input!$AD$7:$AD$506)
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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