Unbrick or Recover Xiaomi Redmi 10A and other MTK devices

Case: Your Redmi 10A (probably other MTK devices too) is not turning on and doesn't react to any button pressed nor cable connection. Requisites:   Dead phone USB Cable  You tried tons of tutorials to unbrick the phone and didn't work This image Willingness to even use Linux to fix it (it's not hard) Steps: Create a bootable USB using the image downloaded. Make sure your computer allows booting from USB. Boot the computer from the bootable USB. When booting, a list of options will be shown. Pick the first one: Boot Live system. Once the system is loaded, go to the right-upper corner to connect to Wi-Fi. Once you have internet, use the Firefox browser (click on the icon in the left-upper corner) and download the Linux version of this tool (SP Flash) and save it in the desktop. Unzip the tool downloaded. Download the fastboot version of the stock ROM . Unzip the ROM, to have the folder and files. Click on 'MTK' icon that is in the desktop. In the command line opene

Getting the Max Value with Condition in Excel

Happy new year my friends!! It's time for the first post of 2014!. As usual, I was working at a floor where working with Excel it's very important, so I was working by myself until a friend that was close to me just asked me something that I couldn't answer at that moment.

She needed to get the max value from a huge list in Excel, but this value had to be obtained according to a condition, in this case this was a product. Let's do this with an example, supose that the list is about three products (A, B and C) and the months that they were sold expressed in numbers. Thereby, the task is to know what was the last month each product was sold. 
 
Excel spreadsheet with maximum to calculate

To make it very clear let's start with the condition function, we use "IF" to show that it's required a condition, which is going to be searched on "Product" column from "Data" section and the condition is product "A", if true it's going to return the value associated to "Months" column. I know that I'm comparing ranges but this is because it'll be useful later.

Using in Excel function to get a conditional value

Ok, the result of this is "1", meaning that I got just the first value of the comparison. And this happened just because "IF" function when receives a range of cells only takes the first one to evaluate, having A=A then it returns the range of cells specified but in a cell is only allowed one value, the first.

Only the first value is considered by function in Excel
 
Well, let's try to embrace that function with another one, "MAX" function.

Using the MAX function in Excel
 
Doing so we get as result "9", which is the max value in the "Data" table, because it's the range returned by "IF" function, then all the calculation is wrong and this is because we are using ordinary functions to make operations over an array.

Not correct value as using a simple function in a matrix

Then, the trick to fix this is to edit again the calculation and press Ctrl + Shift + Enter keys at the same time, with this you will notice that the result is "4" rathen than "9" being now the correct answer, also see that the all formula is embraced in "{}" which is the notation to operate functions over arrays.

Use shortcut in Excel to change function to be applied in matrix

Now, just copy the formula from product "A" to the other products to get the max value for each one.
 
Copy the function to other cells

Remember, using ordinary functions like "IF" with a range of cells just returns the first value, therefore when "MAX" function receives the result of "IF" it jus take the max value of the list returned by this function. To avoid this, it's necessary to apply array functions with Ctrl + Shift + Enter.


Comments

Popular posts from this blog

Unbrick or Recover Xiaomi Redmi 10A and other MTK devices

Inserting Rows o Columns in Excel Not Permitted

I Need to Send an Automatic Email with Lotus Notes