how to put avalaible value to designated cell - excel

I'm having some trouble here.
I have an excel test.
The instruction is to adding a final value with an available value, and it should using trim(instruction unclear but it just said "TRIM" on the sheet test.
The data is look like these.
Btw, what is the function in excel to fill the final score but skip the blank(Actually if it with trim)?

Seems pretty easier. MAX() may work for you.
=MAX(C2:D2)
For Microsoft 365 user can use BYROW() for array approach.
=BYROW(C2:D16,LAMBDA(x,MAX(x)))

If you really, really must use Trim(), you might opt for following solution:
=TRIM(A1&B1)
It means that you are using both cells "A1" and "B1" as strings, you concatenate them and trim it, so, in case either one of them contains only space characters, those get chopped off.

Related

Excel: Provide a split range as one input

Normally in Excel, if I wanted to input a range into a function I would use C8:D13 But what If I split the rows with a row in between, but still wanted that range. So it would be C8:C13 + E8:E13?
But how can one insert this as a single range?
Excel cannot directly concatenate arrays in the way you describe (i.e.
simply combining them back to back.) However, there is a (complicated)
solution to this problem without using helper functions.
You can check out the rest of the details here.
Without knowing more about the problem, it's hard to give an appropriate solution. However, you may look into using TEXTJOIN() with a comma for a delimiter, and set ignore blanks as TRUE, then split the comma-seperated values again.
Some formulas may work differently, but for most, it's quite simple:
Original range:
=SUM(C8:D13)
After inserting a column (automatically updates):
=SUM(C8:E13)
Manual correction to ignore new column:
=SUM(C8:C13,E8:E13)

Calculating revenue in excel

Can't calculate the Revenue since the Cell Price contains the 'BDT'.
I find using SUBSTITUTE() to be a pretty clean solution for this. SUBSTITUTE() does a simple find and replace of text in a cell, where applicable. Then VALUE() ensures that the new text is treated as a numeric value rather than a text string.
For example:
=B2*VALUE(SUBSTITUTE(A2,"BDT ",""))
This saves you from having to calculate LENGTH() or spaces in the text with FIND(), etc., so I think it's a little easier to read and implement than other solutions. And it'll work even if "BDT " doesn't appear in the cell, i.e., if there's nothing to replace, then it just... won't replace.
#GPHOfficial's solution will work too, but I find that little less simple to read.
Finally, the "most correct" solution is probably to create a custom currency symbol/format, so you can apply the format in a way that formulas will completely neglect the symbol and only recognize the value.
Try using the formula =RIGHT
I implemented the formula here, the formula should be interchangeable between Excel and Google Sheets
=IFERROR(RIGHT($A7,LEN($A7)-FIND(" ",$A7))*$B7,"")
https://docs.google.com/spreadsheets/d/1PDqQj1y1G56FKzz0Lp86aM-fzso2-IMTZCvZpOoS3go/edit?usp=sharing
(This is based on the assumption that there is a space between the Price and the Currency Code)
Get rid of the BDT.
Use Text to Columns, Delimited, Next, Space, Next, Do not import column (skip), Finish to remove the BDT and leave the prices as true numbers. If you must show the BDT prefix, use a custom number format of \B\D\T General.

Multiple ranges in RSQ Function formula

I have two data sets to compare using the Excel RSQ Function. The first dataset comprises straightforward sequential cells in a row (A1:D1). The second dataset in the row below takes its final cell from a different reference in the spreadsheet(A2:C2,G12). Can't get the formula with 3 references to work. I seem to have tried all combinations and even read up on array formulas thinking this might help but no luck. Can this even be done?
Obviously the following doesn't work, but for clarity, this is kind of what I'm after:
=RSQ(A1:D1,(A2:C2,G12))
Any help much appreciated.
You don't mention whether this needs to be dynamic or not, so we can use a static array construction:
=RSQ(A1:D1,IF({1,1,1,0},A2:C2,G12))
Note that, if you're not using an English language-version of Excel, the separator within the array constant (here a comma) may require changing.
Regards
Try to replace (A2:C2,G12) with CHOOSE({1;2;3;4},A2,B2,C2,G12).
For completeness, another method. Replace with :
N(INDIRECT({"A2";"B2";"C2";"G12"})).

Excel: read text as string instead of regex

I'm somewhat new to excel and right now working on a sheet that simply counts the sales numbers of products.
I'm using the formula:
=COUNTIFS('salesreport'!$A$1:$A$1048576,'SalesNumbers'!$A1)
The salesreport sheet contains the data with product names in the A column, the SalesNumbers sheet contains a List of the product names in the A column and the mentioned formula in the second column.
Now to the Problem, some of the products have different variants and a * on the name ending e.g. "Product A*", "Product A large*".
Since the * is interpreted as any following text by Excel, the counter for "Product A*" will include the large variant.
Since I receive the data from outside its difficult to simply get rid of the * for future reports which should just be copy/pasted into the template.
The easy way to solve the problem is obviously to subtract the count of the large variant. The Problem I have with that is, that the formula is no longer consistent for all products and might cause problems if somebody beside me will work on the template.
Is there any way to make Excel read the name in the A column as a string instead of a regex?
Thank you in advance!
Ascani0
If I am understanding this correctly then you can use:
=SUMPRODUCT(--(salesreport!$A:$A=SalesNumbers!$A1))
Edit 2 SUMPRODUCT is powerful and pretty useful ARRAY formula which finds many usages. Here we use it to do specific COUNTIF like stuff.
salesreport!$A:$A=SalesNumbers!$A1 part tests equality
It generates boolean ARRAY of {TRUE,FALSE,TRUE....FALSE}
This result cannot be directly passed on to SUMPRODUCT which expects numeric data. So to achieve numeric coercion, we apply double unary (--) which can be also achieved by using +0 or *1 etc methods.
Edit And if you want to use COUNTIFS then you can use it like below:
=COUNTIFS(salesreport!$A:$A,SUBSTITUTE(SalesNumbers!$A1,"*","~*"))
Here tilde(~) does the work as escape character and allows checking of asterisk (*) in literal sense.

Excel: If vlookup returns specific text, countifs number of instances (multiple)

First post, but I am stuck and was hoping for some help. What I am trying to do is use a nested IF formula to determine whether the value returned by a VLOOKUP matches specific text on another sheet in the same workbook. If it does, to then use the COUNTIFS function to determine the sum of instances that specific text contained in a specific cell appears on another sheet (also in the same workbook).
One part of these formulas seems to work, but when I combine it with others, it errors and I can't figure out why.
It's probably something simple, but I'd appreciate any help. Here's the part that seems to "work"
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))
If I put one more parenthesis, it works as is, but seems to omit some of the "All" Vlookup results... thus why I put works in quotations above. That might be an issue with my spreadsheet though, but felt I should include in case I'm just being idiotic. Regardless, when I input two additional IF statements, it errors.
The final formula I've crafted looks like this (double spaced for ease of reading only):
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="One",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Two",
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY"),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Three",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),"0"))
Any ideas?
Thanks!
Ryan Olson
Just cleaned up some bracketing. Let me know how it goes as I didn't alter the formula otherwise.
=IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="All",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")+(COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="One",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Two",
COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Three",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),"0"))))

Resources