Posts

Showing posts from 2017

Car Assistance triage Tree - Excel Userform -1

Image

Problem 1 :- Filter Data and paste to other sheet

Dear Sir / madam,
Please see the attachment.  
I have a problem I want to copy data base on the Person name which i highlighted with yellow colour. suppose if the person name "JKM" a sheet will created with the name "JKM" and the entire rows data relating to Jkm WILL copy to the new sheets of JKM.  if the person name is HM the the same rule will be follow.



Attachment

https://drive.google.com/file/d/0B2BJddV6HsaWUkxicUp0TlVxb1U/view?usp=sharing



Sub Test()
Dim J As Integer
Dim sh As Worksheet
Sheet1.Range("M:M").Copy Sheet1.Range("Z:Z")
Sheet1.Range("Z:Z").RemoveDuplicates Columns:=1, Header:=xlNo
'Set sh = Worksheets
For J = Sheet1.Range("Z" & Rows.Count).End(xlUp).Row To 3 Step -1

    ActiveSheet.Range("A2:M" & Sheet1.Range("M" & Rows.Count).End(xlUp).Row).AutoFilter Field:=13, Criteria1:=Sheet1.Cells(J, 26)


Sheet1.Range("A2:M" & Sheet1.Range("M" & Rows.Count).En…

End Function in Excel

Image
This function tests two or more conditions to see if they are all true.It can be used to test that a series of numbers meet certain conditions. It can be used to test that a number or a date falls between an upper and lower limit.
Note :-  1. Returns TRUE if all its arguments evaluate to TRUE. 2. Returns FALSE if one or more arguments evaluate to FALSE
=And(Logical1,Logical2,.......)


=AND(TRUE,TRUE)       =      TRUE
=AND(TRUE,FALSE)      =      FALSE







Age Calculation

You can calculate age based on their birthday and today's date.
1 :- Datedif Function :-  Calculates the number of days, months, or years between two dates                            =datedif(start date, End Date, Unit) Unit:- 1. Number of completed year :- Y 2. Number of completed Month :- M 3. Number of completed Days :- D 4. The difference between the days. The months and years of the dates are ignored :- MD 5. The difference between the months. The days and years of the dates are ignored :- YM 6. The difference between the days. The years of the dates are ignored :- YD
2 :- Today Date Function :- Returns the current date.                           =today()
Age Calculation :- (C1 = 10-Mar-1980)Number of Years :-  DATEDIF(C1,TODAY(),"y") Number of Months:-DATEDIF(C1,TODAY(),"ym") Number of Day's :- DATEDIF(C1,TODAY(),"md")
Birth date :10-Mar-1980Number of Years :     37Number of Months :      2Number of Days :      1

Filename formula

There may be times when you need to insert the name of the current workbook or worksheet in to a cell. =CELL("filename")
The problem with this is that it gives the complete path including drive letter and folders.
Pick the Excel Path. =MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)
Pick the Workbook name. =MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1)
Pick the Worksheet name. =MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

Time Calculation

Image
1. :- Excel can work with time very easily.
2:- Time can be entered in various different formats and calculations performed. 3:- There are one or two oddities, but nothing which should put you off working with it.
Time Formats :- HH:MM:SS
When time is entered into worksheet it should be entered with a colon between the Hour, Minute and Seconds. Example 1 :- 10:20:22 , 13:30:01, 23:00:00                            OR Example 2 :- 10:20 AM , 01:30 PM, 11:00 PM Excel can either the 24 hour or the am/pm system.
Difference between two times
End Time - Start Time  = difference
You may need to reformat the answer.
Adding timeEnd Time + Start Time  = Answer =Sum(start Time + End Time)How To Apply Custom Formatting



1. Click on the cell which needs the format.2. Choose the Format menu. 3. Choose Cells. 4. Click the Number tag at the top right. 5. Choose Custom. 6. Click inside the Type: box. 7. Type [hh]:mm as the format. 8. Click Enter or OK to confirm.

Return the characters after Nth character in a Cell

Image
Return the characters after the nth ","|"."

Use of SUBSTITUTE function when you are replacing text based on its content. SUBSTITUTE find and replaces your old text with new text in a text string. 
SUBSTITUTE(text, old_text, new_text, [instance_number])

The SUBSTITUTE function syntax has the following arguments
Text  Required. The text or the reference to a cell containing text for which you want to substitute characters.
Old text  Required. The text you want to replace.
New text  Required. The text you want to replace old text with.
Instance number  Optional. Specifies which occurrence of old text you want to replace with new text. If you specify instance number, only that instance of old text is replaced. Otherwise, every occurrence of old text in text is changed to new text.REPT :- Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.
REPT(text, numbertimes)

Text  Required. The text you want …