Tuesday, November 30, 2004
Monday, November 29, 2004
Select cell A1.
Choose "Validation" from "Data" menu.
Choose "Settings" tab.
Choose "Custom" from "Allow" drop-down list.
In the Formula box, enter the following =NOT(OR(COUNTIF($A$1:$A$10,A1)>1))
Choose the "Error Alert" tab in order to set an alert style.
Set Style to Stop (the alert message with a Stop sign on it).
In the Title box, enter what you want to appear in the Error Alert's title bar (for example, "Duplicated Entry"); in the Error Message box, enter the message box text ("Please type an entry not entered previously," for example).
Back in the worksheet, select cell A1;
then, using the square AutoFill handle, drag to fill cells A2:A10.
Sunday, November 28, 2004
The formula for extracting the first name is =LEFT(A1,FIND(" ",A1))
The formula for extracting the last name is =MID(A1,FIND(" ",A1)+1,LEN(A1))
This tip can be used for many other purposes and comes out very handy.
Saturday, November 27, 2004
Position your cell pointer to define the rows and columns to freeze.
Go to the Window menu and choose Split or Freeze Panes.
Return to the Window menu to Remove Split or Unfreeze Panes.
Split gives you areas that you can scroll within.If you've chosen Freeze Panes your cell pointer will move out of the frozen pane area if you attempt to move beyond it.
Friday, November 26, 2004
Keyboard shortcut Press Ctrl and ~(Tilde sign)
Tools Options View tab Window Options section, check Formulas.
Thursday, November 25, 2004
Wednesday, November 24, 2004
1. Go to Tools Options.
2. On the Error Checking tab, select the Enable Background Error Checking and Number Stored As Text check boxes, and click OK.
Now, when Excel finds a number in a cell formatted as text, it will place a green error indicator in the upper left corner of the cell. To convert cells to a number format, select the cell, click the Error Checking Options button displayed to the left of it, and select Convert To Number.
Tuesday, November 23, 2004
You may temporarily want to turn off the automatic calculation option while working with large worksheets in Microsoft Excel. This allows you to enter all the formulas without having to wait for a recalculation. To do this:
- Open the Tools menu and click Options.
- In the Options dialog box, click the Calculations tab.
- Then, click on the radio button labeled Manual, and click OK to close the dialog box.
- If you want to check a calculation while you are working, simply press F9.
When you finish a large worksheet, don’t forget to turn automatic calculation back on.
Monday, November 22, 2004
Move entire rows: Highlight the row numbers. Hold down the Shift key. Drag.
Data selection of multiple areas: Press the Control key while using the mouse to select multiple cells, data ranges, columns, rows, or worksheet tabs.
Modify the area of a selected range: If you use the mouse to highlight a range of too many or too few cells, use the Shift and Arrow keys to modify your selection.
To select a single column: Put the cursor in the column then control-spacebar, or click on the column letter.
To select a single row: Put the cursor in the row then shift-spacebar, or click on the number.
To select the entire worksheet: Control A or click on the blank cell in upper left corner.
To select a range: Click the cell in the upper left corner. Hold down the shift key. Click the opposite corner.
To select multiple ranges: Press Control then repeat the above procedure in another area.
To select all worksheets: Right click on any tab and choose Select All Sheets.
Sunday, November 21, 2004
The sumproduct has it's own limitation of being used to return only number but for numbers, I find it most suitable.
Before writing formulas, always break it parts, see the results of that part and then merge parts together.
Saturday, November 20, 2004
Answer is 17 or 32
It is 17.
Remember this order:
B E D M A S
B = ( ) Brackets
E = 2raise to power 3 Exponents=8
D = / Division
M = * Multiplication
A = + Addition
S = - Subtraction
Friday, November 19, 2004
Say, you want to look up the salary of a person by using the person's name. To do this, use a combination of the INDEX and MATCH functions as under:
This formula uses cells B3:D7 and looks up Lal's salary in the third column. The formula returns 4000.
Thursday, November 18, 2004
Here in this example, I have used both, Sumproduct and Array formula Sum to show the results from both.
Essentially, in A8 and A13 , we are finding out sum of quanity which are greater than 20 with "Sam" in Area "a" and in A10 and A15 , we are finding out count of records of quanity which are greater than 20 with "Sam" in Area "a" both by SumProduct formula and array formula of Sum(where you have to enter Ctrl+Shift+Enter to enter the formula):
You can perform many calculations using this magic Sumproduct formula without ever bothering to go for array formula.
Wednesday, November 17, 2004
Type in the second line. Do the same again if you have more lines to enter.
Press ENTER when you are done typing.
Tuesday, November 16, 2004
To try this:
In a worksheet, type the due date in cell A1, using slashes to separate day, month, and year.
In cell A2, type =DATEDIF(A1,TODAY(),"d")
and press ENTER.
The overdue period (in days) will be displayed in cell A2.You can replace "d" with "m" or "y" to find out period in months or years.Same way, you can replace Today() with a date field to find difference between those two fields like, invoice date and payment date.
Monday, November 15, 2004
The worksheet carries three columns, A, B and C.A is for name of student, B for marks and C for gender(M/F).
Your sheet looks like
A ------B -----C
Mary -- 60 -- F
Sam -- 70 -- M
Tim -- 65 -- M
Rudy -- 80 -- F
Jack -- 75 -- M
For this, you want to see Number of Males getting more than 70.
The formula will be(Write this in the cell you want the result):
=SUM(IF($B$2:$B$6> =70, IF($C$2:$C$6="M",1,0)))
Press CTRL+SHIFT+ ENTER.
The result in this case is 2.
Sunday, November 14, 2004
The format function is:
You could use:
Or any other similar formatting argument.But Microsoft provides lot of predefined VBScript functions designed to reduce coding time:
When specifying the format argument, you can either type the Visual Basic constant name (name in left column), or the constant's corresponding value (0 - 4, from the middle column). They do the same thing, it's just less typing if you use the value.
I find using numbers very fast and useful. Like;
Saturday, November 13, 2004
- Retrieves the user IP Address
IP = Request.ServerVariables ("REMOTE_ADDR")
- Retrieves the remote host IP Address
- Retrieves the page domain name
serverName = Request.ServerVariables("server_name")
- Retrieves the referer url
- Gets the browser type
- Retrieves page url
- Retrieves request mehtod .. get or post
- Retrieves server port
- Retrieves current page
- Retrieves server software
Consult the Microsoft Documentation for a full description of all the Server Variables.This handy list is a for commonly used server variables including referred above:
Friday, November 12, 2004
Using DateTime Picker With Null Support with MS Access and ASP.Net
Selecting, Confirming and Deleting Multiple DataGrid items in ASP.NET
CodeSnip: The Basics of MS Access with ASP.NET
CodeSnip: Bidirectional Sorting of a DataGrid in VB.NET
SELECT tblshipment.*, IIf(([D1]=2 And [D2]=6),((DateDiff("h",[orderdate],[shipmentdate]))-48),IIf(([D1]=2 And [D2]=7),((DateDiff("h",[orderdate],[shipmentdate]))-24),DateDiff("h",[orderdate],[shipmentdate]))) AS DD, Format([shipmentdate],"w") AS D1, Format([orderdate],"w") AS D2, DateDiff("h",[orderdate],[shipmentdate]) AS DDxFROM tblshipment;
By this, I am first finding out hours difference in order date and shipment date and then, looking for, if order date was Friday and shipment date is Monday, then reduce 48 hrs from time difference or if order date was Saturday and shipment date is Monday, then reduce 24 hrs from time difference, to give effect for weekend closure.
Assume Account Numbers are in column A and we created column F for this formula:
=IF(COUNTIF($A$1:A2,A2)>1,0,COUNTIF($A$1:A2,A2)) and copying it till the last account number row.
This gave value 1 for each unique account and 0 for repeatition.Just addition of this column provided me by number of unique accounts.