Please help slightly change the formula

K0st4din

Active Member
Joined
Feb 8, 2012
Messages
488
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
Hello everyone, please for your assistance in correcting the formula.
I have two worksheets:
In Sheet2 in column A - I have different dates (2.6.2020, 15.6.2020, ect. down)
in column B - I have different words (from the drop-down menu)
in column H - I have prices for this Words
I'm trying in Sheet1 to compare
In column A (vertically) is the calendar month and in column G I need if the word on the same date (for example it has 2 times 20 dollars), in this column G of the corresponding row to add me and I see a result of 40 dollars .
The formula that worked was as follows:
Rich (BB code):
=IF(SUM(SUMIFS(Sheet2!$H$6:$H$65;Sheet2!$B$6:$B$65;{"Good";"food";"house"};Sheet2!$A$6:$A$65;{"1"}))=0;"";SUM(SUMIFS(Sheet2!$H$6:$H$65;Sheet2!$B$6:$B$65;{"Good";"food";"house"};Sheet2!$A$6:$A$65;{"1"})))
The problem is this {1} or {2}, {3} - Because before he recognized it, obviously as a word, and now I want to take it from the date 1.6.2020
But this 1 was text and for many other reasons it is now 1 again, but from 1.6.2020 (which is already a date).
My problem is that I don't know how to read 1 from the date to get the sum.
I ask for some assistance on your part.
Thank you in advance
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Sheet2
2020-07-17_133442.jpg






Sheet1

2020-07-17_133540.jpg
 
Upvote 0
Just change 1 to DATE(YYYY,MM,DD) or change it cell reference
 
Upvote 0
=SUM(SUMIFS(Sheet2!H:H,Sheet2!B:B,{"food","House","Auto"},Sheet2!A:A,Sheet1!A2))

With Control+Shift+Enter
 
Upvote 0
Thank you very much for your cooperation.
I also put an IF because when there are no values it shows me 0-zero.
Can I put it on again and again Control+Shift+Enter
 
Upvote 0
You can use
this to avoid Ctrl+Shift+Enter and will not get 0 if there is no data in the range

New Microsoft Excel Worksheet.xlsx
EFGH
71
82
931
104
11
12
Sheet1
Cell Formulas
RangeFormula
G9G9=AGGREGATE(15,6,E7:E10/(E7:E10>0),1)
 
Upvote 0
=IF(SUM(SUMIFS(Sheet2!$H$6:$H$65;Sheet2!$B$6:$B$65;{"Good";"food";"house"};Sheet2!$A$6:$A$65;{"1"}))=0;"";SUM(SUMIFS(Sheet2!$H$6:$H$65;Sheet2!$B$6:$B$65;{"Good";"food";"house"};Sheet2!$A$6:$A$65;{"1"})))
Will we be able to explain things a little, because it is not very clear to me?
above is my currently not working formula
You mean to replace this {1} with DATE (dd; mm; yyyy) - (this is the case when it's only for example for the 6th month, and for me it will change every month and if I have to go in to change months each time, not a good option -> If I understood correctly.
Example if it is this month, the formula should be DATE (1.6.2020), the next will have to change again 31 days (lines).
=IF(SUM(SUMIFS(Sheet2!$H$6:$H$65;Sheet2!$B$6:$B$65;{"Good";"food";"house"};Sheet2!$A$6:$A$65;DATE(01;06;2020)))=0;"";SUM(SUMIFS(Sheet2!$H$6:$H$65;Sheet2!$B$6:$B$65;{"Good";"food";"house"};Sheet2!$A$6:$A$65;DATE(01;06;2020))))

-------------------------------------------------------------------
The last one with AGGREGATE I didn't understand at all.
where do these 15, 6 come from?
------------------------------------------------------------------------
regarding this formula:
=SUM(SUMIFS(Sheet2!H:H,Sheet2!B:B,{"food","House","Auto"},Sheet2!A:A,Sheet1!A2))
or
=SUM(SUMIFS(Sheet2!$H$6:$H$65,Sheet2!$B$6:$B$65,{"food","House","Auto"},Sheet2!$A$6:$A$65,Sheet1!A2))
In my case all letters (columns) are in the range A6:A65, B6:B65, H6:H65, in sheet2.
In this case with $ or without $ to write them?
 
Upvote 0
Please ignore the Post 7. Mistakenly i posted someone else query here.
OK :)
can we discuss this formula, because the moment I hit Ctrl+Shift+Enter - "OPEN File" opens - I mean ctrl + o
regarding this formula:
=SUM(SUMIFS(Sheet2!H:H,Sheet2!B:B,{"food","House","Auto"},Sheet2!A:A,Sheet1!A2))
or
=SUM(SUMIFS(Sheet2!$H$6:$H$65,Sheet2!$B$6:$B$65,{"food","House","Auto"},Sheet2!$A$6:$A$65,Sheet1!A2))
In my case all letters (columns) are in the range A6:A65, B6:B65, H6:H65, in sheet2.
In this case with $ or without $ to write them?
I try it, but things don't work out for me.
if you find it easier, I have attached an example, write it there and I will download the file.
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,977
Members
449,200
Latest member
Jamil ahmed

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