简体   繁体   中英

Google sheets sum two columns based off of different variables sorted by variables

I have a list of items that are in two distinct columns, with different values in each. The columns are not sorted and are about 15000 lines long each. There are items in Column A, that will not be present in column C, and vice versa. Check here for reference on what I'm talking about. I need to get the sum of columns B and E, sorted by columns A and D, like you can see on sheet 2. Is there a convenient way to go about this?

use:

=QUERY({A:B; D:E}, 
 "select Col1,sum(Col2) 
  where Col2 matches '\d+'
  group by Col1 
  label sum(Col2)'Total'")

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM