Combine Excel Text with Max Function - excel

Let's suppose A2="A1" and A3="A10". If I wanted to use the concatenate function in a max formula to find the max between the range A1:A10, I would write =MAX(CONCATENATE(A2):CONCATENATE(A3)) but it fails.
Is there a way to input string in the max function? It would be useful for the task at hand.

Use INDIRECT():
=MAX(INDIRECT(A2&":"&A3))

Try this one:
=max(indirect(A2&":"&A3),true)
Edit:
it should have been
=max(indirect(A2&":"&A3,true))

Related

Is there any if function to skip NA values in excel

Hi All, I am trying to use average function where it can skip the NA values. As per attached snapshot how can i get the result of correct one which is 200/3. I want to take the count of NA but not while calculating average. I can's use 0 because the value will be calculated as well like the sAMPLE2 snapshot. Please advise.
AGGREGATE is able to do this:
=AGGREGATE(1,4,your_range)
1 is to activate the AVERAGE function;
4 is to ignore error values.
There are different functions which can do that: there is =IfNA() and there is =IfError() worksheet functions.
You can use worksheet functions in VBA, using Application.WorkSheetFunction object, like Application.WorksheetFunction.IfNA() or Application.WorksheetFunction.IfError().
More information can be found in the IFNA documentation or the IFERROR documentation.
Good luck
You can use combination of SumIf <> # NA and CountA function as both have ability to ignore errors.
SUMIF(D2:D4,"<>#N/A")/COUNTA(D2:D4)
This would help

Excel sum-formula

is there a nicer and more compact way to write this formula in Excel?
=SUM(MAX(0,H4-B4),MAX(0,H5-B5),MAX(0,H6-B6),MAX(0,H7-B7),MAX(0,H8-B8),MAX(0,H9-B9))
I tried to write it like this:
=SUM(MAX(0,H4:H9-B4:B9))
But that is not the identical term. Could anyone please help me?
MAX accepts arrays as entry and will return the max of all the entries and not compare each to 0. so the Max will return only one number to sum. We need a different approach.
Use:
=SUMPRODUCT((H4:H9-B4:B9>0)*(H4:H9-B4:B9))

Extract number between specific symbols in Excel

I will need help how to extract the number inside this string:
test-343-image(1)(Pic2).jpg
I will need the second number after "(Pic" and before ").jpg" which is 2.
Thanks in advance!
Probably multiple ways, for example:
Formula in B1:
=SUBSTITUTE(MID(A1,FIND("(Pic",A1)+4,99),").jpg","")
And if your number can only between 1-9 then the following would be enough:
=MID(A1,FIND("(Pic",A1)+4,1)
Or:
=LEFT(RIGHT(A1,6),1)

Concatenate the shortcut st, nd, rd to column value - Excel

Column A has numbers from 1 - 5 and in column B i want to concatenate the number of Column A with the relevant nth term as indicated in the image below. Any help will be greatly appreciate!
Without using VBA, your best option would be the "CHOOSE()" function.
Try something like this for any number > 0:
=IF(AND(MOD(ABS(A1),100)>10,MOD(ABS(A1),100)<14),"th",CHOOSE(MOD(ABS(A1),10)+1,"th","st","nd","rd","th","th","th","th","th","th"))
You can set up a named "key" separately, much like the table you are showing, and then reference the key to replace any number with the desired output.
You can then indexmatch/vlookup the number, referencing the table, to find the output.
For ex:
=vlookup($A1,key,2,FALSE)
you could use nested IF functions and RIGHT like this
=IF(OR(RIGHT(H2,2)="11",RIGHT(H2,2)="12",RIGHT(H2,2)="13"),CONCAT(H2,"th"),IF(RIGHT(H2,1)="1",CONCAT(H2,"st"),IF(RIGHT(H2,1)="2",CONCAT(H2,"nd"),IF(RIGHT(H2,1)="3",CONCAT(H2,"rd"),CONCAT(H2,"th")))))
Probably not the fastest performance wise

Using the SMALL function: EXCEL

If I use =Small({VALUE(DV147),VALUE(DZ147),VALUE(ED147),VALUE(EH147)},2) it does not work. But, if I use SUM and the Value(-----) amounts, it works. What am I doing wrong?
Note: The numbers are stored as text in those cells for other reasons.
A couple of ways:
=SMALL(VALUE(T(INDIRECT({"DV147","DZ147","ED147","EH147"}))),2)
or:
=SMALL(VALUE(T(OFFSET(DV147,,{0,4,8,12}))),2)
To answer your specific question:
What am I doing wrong?
The elements of an array constant need to be constants. Formulas/Functions cannot be components of an array constant. Although you can certainly use formulas to create an array, as shown by XOR LX in his answer.

Resources