Monday, 28 December 2020

How to set up a sheet for Histogram

 Suppose we have a series as shown in A. so first we set up B



The formula for Bin and frequency is as follows:



The formula for cumulative frequency is as follows:




Saturday, 19 December 2020

How to remove Be careful! Parts of your document may include personal information that can't be removed by the Document Inspector

 here's how you fix it: Goto File in the upper left hand corner, then Options > Trust Center > Trust Center Settings > Privacy Options > then un-check the check box that says "Remove personal information from file properties on save", then hit OK. 

How to Extract the first letter of Every word in a sentence in excel

 Use this code

------

Function ExtractFirstLetter(text) As String

mystring = Left(text, 1)

For i = 2 To Len(text) - 1

If Mid(text, i, 1) = " " Then

    mystring = mystring & Mid(text, i + 1, 1)

End If

Next i

ExtractFirstLetter = WorksheetFunction.Substitute(UCase(mystring), " ", "")

End Function

--------------

Use it like this:


-------------------

Thursday, 10 December 2020

How to Pull the distinct values from a column

 Regular distinct formula, just drag the cursor to get all the distinct values:

=IFERROR(INDEX($A$2:$A$10, MATCH(0, INDEX(COUNTIF($B$1:B1, $A$2:$A$10), 0, 0), 0)), "")

Where:

  • A2:A10 is the source list.


Monday, 7 December 2020

How to subtract month from a date

 You can use the EDATE function to quickly add or subtract months from a date. The EDATE function requires two arguments: the start date and the number of months that you want to add or subtract. To subtract months, enter a negative number as the second argument. For example, =EDATE("9/15/19",-5) returns 4/15/19.

Thursday, 26 November 2020

How to convert a text format to date format in excel - Tableau Way

 For example if you have a date like:


July 10, 2020 : Normally in tableau

How to convert ( Logic)

1. Month

 Extract the characters till you get a space and convert those characters to the month number

=MONTH(DATEVALUE(LEFT(A2,FIND(" ",A2))&"1"))

2. Day

Extract the characters between space and comma. Basically this is the way how we extract string between two characters


=MID(A2, FIND(" ",A2)+1, FIND(",", A2, FIND(" ", A2)+1)-FIND(" ",A2)-1)

3. Year

Extract the rightmost four characters

=RIGHT(A2,4)

4. Convert everything into date format which is given by

Date( Year, Month,Day)

=DATE(RIGHT(A2,4),MONTH(DATEVALUE(LEFT(A2,FIND(" ",A2))&"1")),MID(A2, FIND(" ",A2)+1, FIND(",", A2, FIND(" ", A2)+1)-FIND(" ",A2)-1))



Saturday, 21 November 2020

How to find the unique or distinct values in a column in excel

The formula is 


=SUM(1/COUNTIF(B4:B722,B4:B722))

Where B4:B722 are the values in the column. 

Remember to close it by ctrl+shift+enter

This is an extremely useful formula