Hello, I am new to this forum so I hope I am posting in the correct area.
I am trying to come up with a calc formula where I am on one page but need to collect data from another page. I have 3 salespeople that I am tracking certain information on. First I will post an example of what I am trying to do but the formula is off.
=COUNTIF('XYZ'!G5:G250,"RL")+COUNTIF('XYZ'!K5:K250,">=1")
What I am trying to do is this. If on page xyz...G5:G250 contains the name RL and K5:K250 is greater than one....count the sum of K5:K250 only if the G column contains the
It almost works except it just counts G5:G250 containg RL and sums it up with K5:K250. I've also tried sumproduct formulas as well havina real struggle here
Any help would be appreciated. Thank you so much
[Solved] Count data, using multiple criteria
[Solved] Count data, using multiple criteria
Last edited by Hagar Delest on Sat Jan 25, 2020 1:39 pm, edited 2 times in total.
Reason: tagged solved
Reason: tagged solved
OpenOffice 4.1.6 on Windows 10
Re: Need help with a Calc formula
Try
Note the . between the sheet name and the cell range, not a !.
Code: Select all
SUMPRODUCT(XYZ.G5:G250 = "RL"; XYZ.K5:K250 >=1)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Count data, using multiple criteria
Thank you do much for your help but I think I didn’t explain properly. I’m going to take out of the equation for the minute that I am pulling from another page.
On row G for example I will have 3 people’s initials...AB, CD, and EF. On row K I will have a dollar amount. I am trying not to add the dollar amounts but count each time anything over 1 in row K where the AB person is located on the adjacent G column
On row G for example I will have 3 people’s initials...AB, CD, and EF. On row K I will have a dollar amount. I am trying not to add the dollar amounts but count each time anything over 1 in row K where the AB person is located on the adjacent G column
OpenOffice 4.1.6 on Windows 10
Re: Count data, using multiple criteria
In Calc, rows are numbered, not lettered. Columns are lettered, thus you can not be using row G. I'm guessing, like I suspect FJCC did, that you meant columns G & K, not rows.
I suspect, based on your second post, that you misunderstand how the SUMPRODUCT function works when using comparisons as parameters.
You should be able to replace the first parameter in FJCC's code with an OR statement, so that you would end up with something like
If you find that you are having trouble incorporating the formulas we are giving you with your actual data, then upload a sample of your spreadsheet with some dummy data so that we can return your sample spreadsheet with the formulas properly incorporated.
I suspect, based on your second post, that you misunderstand how the SUMPRODUCT function works when using comparisons as parameters.
You should be able to replace the first parameter in FJCC's code with an OR statement, so that you would end up with something like
Code: Select all
=sumproduct(or(xyz.g5:g250="AB";xyz.g5:g250="CD";xyz.g5:g250="EF");XYZ.K5:F250>=1)
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Re: Count data, using multiple criteria
If you are using Excel:
Code: Select all
=sumproduct(or(xyz!g5:g250="AB";xyz!g5:g250="CD";xyz!g5:g250="EF") * (XYZ!K5:F250>=1))
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
- MrProgrammer
- Moderator
- Posts: 4909
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Count data, using multiple criteria
Hi, and welcome to the forum.
You should use the formula that you understand.
If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
A simple way to get a count for the three people:pac626 wrote: I will have 3 people’s initials...AB, CD, and EF. On row K I will have a dollar amount. I am trying not to add the dollar amounts but count each time anything over 1 in row K
=SUMPRODUCT(XYZ.G5:G250="AB";XYZ.K5:K250>=1)
+SUMPRODUCT(XYZ.G5:G250="CD";XYZ.K5:K250>=1)
+SUMPRODUCT(XYZ.G5:G250="EF";XYZ.K5:K250>=1)
Another way, shorter but more abstruse:
=SUMPRODUCT(XYZ.G5:G250={"AB";"CD";"EF"};XYZ.K5:K250>={1;1;1})
[Tutorial] The SUMPRODUCT function, example X24You should use the formula that you understand.
If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: Count data, using multiple criteria
And since pivot tables (aka "data pilots") are so easy.
https://wiki.openoffice.org/wiki/Docume ... /DataPilot
https://wiki.openoffice.org/wiki/Docume ... /DataPilot
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Count data, using multiple criteria
Thank you to everyone I was able to solve it with your help. I’m actually using this on Google Docs and grabbing data from one page to another.
=SUMPRODUCT(‘HONDA R’!G5:G250=“RL,’HONDA R!K5:250>=1)
That is my exact formula for my situation and did exactly what I needed. Thank you so much. I’m also going to play with done if the other shorter ways I see here too for fun.
=SUMPRODUCT(‘HONDA R’!G5:G250=“RL,’HONDA R!K5:250>=1)
That is my exact formula for my situation and did exactly what I needed. Thank you so much. I’m also going to play with done if the other shorter ways I see here too for fun.
OpenOffice 4.1.6 on Windows 10