SUMPRODUCT with a LEFT & AND - Excel - excel

Is it possible to combined Sumproduct, left and a AND function all together in Excel.
I have the below formula working correctly - but i want to add in the additional reviews which also = "88"
="Number Reviews: "&SUMPRODUCT(--(LEFT(M:M,2)="77"))
Is there a way to add in an "and" function which allows me to sum up all of 77 and 88 altogether?
& If this is possible - if i wanted to add up the remaining totals which are not 77 or 88, is that possible?
Thanks

If i understood your question correctly, this should work.
Sum up all of 77 and 88 altogether :
="Number Reviews: "&SUMPRODUCT(--(LEFT(M:M,2)="77")) + SUMPRODUCT(--(LEFT(M:M,2)="88"))
Which are not 77 or 88 :
Assuming you have Header in the data
=COUNTA(M:M)-(SUMPRODUCT(--(LEFT(M:M,2)="77")) + SUMPRODUCT(--(LEFT(M:M,2)="88")))-1

Related

Make chart or table based on grouping url parameters values in excel

Let's say I have a bunch of urls like so:
URL
views
blah/?color=green&size=l
50
blah/?color=green&size=s
50
blah/?color=red&size=l
87
blah/?color=green&size=m
60
blah/?color=yellow&size=l
32
blah/?color=green&size=m
10
I want to make a chart/pivot table or anything possible that will group by text (here, by the value of the color parameter) and show the sum of this group.
URL
views
green
170
red
87
yellow
32
How can I do such a thing?
If you have Excel 365 then you can use this formula
=LET(Urls,A2:A7, Views,B2:B7,
UniqueColors,UNIQUE(MID(Urls,FIND("=",Urls)+1,FIND("&",Urls)-FIND("=",Urls)-1)),
ViewsSum,SUMIF(Urls,"*=" & UniqueColors & "&*",Views),
CHOOSE({1,2},UniqueColors, ViewsSum))
The formula
gets unique colors from the URLs between "=" and "&" --> UniqueColors
sums the views per color --> ViewsSum
returns the new matrix build from UniqueColors and ViewsSum

Excel naming dynamic variable

I'm creating an excel sheet which takes a sum of variables based on value of A,B,C and the number along with it 10A,20B, or 9C So,
10A = 10, 20B = 40, 9C = 27
to put it in simple terms
A=1, B=2, C=3
10A = 10(1); 20B = 20(2); 9C = 9(3);
Is that possible to do in Excel 2016?
Please try:
=LEFT(A1,LEN(A1)-1)*(CODE(RIGHT(A1))-64)
(If to be added up: {=SUMPRODUCT(LEFT(A1:C1,LEN(A1:C1)-1)*(CODE(RIGHT(A1:C1))-64))})
Make a table with your values. In my example, I called TB_VALUES
Then you can combine your table with a VLOOKUP to search for a letter and make the operation.

incapsulated if functions in excel formulas not working

I am trying to create a logical function in excel for the following conditions.
if value > 85 then the output should be 2
else if value < 85 the output should be 1
else
value < 65 the output should be 0
The formula I have created has the following syntax:
=IF(O25>85;"2";IF(O25<85;"1";IF(O25<65;"0")))
But the output for when it's less than 65 fails.
What have I missed here?
Add an AND statement, or swap order and check if less than 65 first
And statement:=IF(O25>85;"2";IF(AND(O25<85;O25>=65);"1";IF(O25<65;"0")))
Change order: =IF(O25>85;"2";IF(O25<65;"0";IF(O25<85;"1")))

Using the isnumber() function in Excel and Formatting Issue

I have a list of values, some being integers and some being non-integers. I would like to return the values that are integers. My idea:
if(ISNUMBER(C1)=TRUE,C1,0)
The data is laid out as so
88
Francesc Fabregas
m
86
Andrey Arshavin
a
86
Therefore I would only return the 88, 86, and 86. 88 is in cell C1.
Update: THE CELLS HAVE THE VALUES STORED IN THEM AS TEXT. HOW MIGHT I CHANGE ALL THE CELLS FORMATTING TO NUMBERS?
Try:
=IFERROR(--C1,"")
It will try to multiply -1*-1 to the value, if it is like a number it will return the number but if not it will error out and return "".
If you are using 2003 or later then use:
=IF(ISERR(--C1),"",--C1)
To do it in place highlight the range and you will see a little box in the upper left corner:
Hit that button and you will have a drop down list of option. Choose the "Convert to Number" option.
The NUBMERVALUE() function converts text to numbers. So the formula
=IF(ISNUMBER(NUMBERVALUE(D14)), NUMBERVALUE(D14), 0)
would turn your data to
88
0
0
86
0
0
86

what formula to use in excel when trying to subtract

I have a list of numbers that i need to subtract to 60 when the number is greater than 60. is there any one here knows on what formula to use and how for me to do this????
for example:
61 = 1
75 = 15
52 = 52
using the needed formula this should be the result
Use IF condition.
The syntax for the Microsoft Excel IF function is:
IF( condition, [value_if_true], [value_if_false] )
Formula
=IF(A1>60,A1-60,A1)
Test link
I'm assuming this is number of seconds or minutes, and you want to clip it at 60 to wrap it around. This will do it:
=MOD(A1,60)
Otherwise use the If function like Ullas indicated above.

Resources