Skip to main content

Posts

Showing posts from March, 2020

Excel - SUMPRODUCT Formula / How to Count Cells According to Multiple Criteria

While using Excel, sometimes we need to count some cells which have special qualitatives.  Excel can count all the cells which included an important number for us, a text which special for us... An Example:  If you want to know how many "yellow" cells are "glass 4mm", just write this code:  =SUMPRODUCT((C3:C16="Yellow")*(B3:B16="Glass 4mm")) If you want to know how many "black" glasses have 20 or less quantity, this code is for you:  =SUMPRODUCT((C3:C16="Black")*(D3:D16>=20)) If you want to know how many products is less than 20 and cheaper or equal to 100$, this is the code:  =SUMPRODUCT((E4:E16<=100)*(D4:D16<=20)) These samples can be reproduced. You just need to write suitable code for your scenario.

Excel - VLOOKUP Formula / Pulling Data From Another Database or File

In Excel, if you have two different .xlsx file and just 1 common information in these files, you can use VLOOKUP command to match&pull datas and combine them...  For example you can use if you have same columns included citizenship number, customer number, telephone number etc. Formula Example:   Include into C2 cell this formula without quotas: "=VLOOKUP(B2:B6;[A.xlsx]Sheet1!$A$2:$E$6;4;0)" Include into D2 cell this formula without quotas: "=VLOOKUP(B2:B6;[A.xlsx]Sheet1!$A$2:$E$6;5;0)" A tip from the Microsoft's website: In its simplest form, the VLOOKUP function says: =VLOOKUP(What you want to look up, where you want to look for it, the column number in the range containing the value to return, return an Approximate or Exact match – indicated as 1/TRUE, or 0/FALSE). Note: VLOOKUP searches left to right. If you want to search top to bottom, you can use HLOOKUP command. Here are the sample files: A.xlsx B.xlsx