Tampilkan postingan dengan label Excel Tips. Tampilkan semua postingan
Tampilkan postingan dengan label Excel Tips. Tampilkan semua postingan

Jumat, 09 Oktober 2009

Replace characters '0 Excel 2007

A B C
1 56695864
2 22489653
3
4

Use Formula :

=REPLACE(A1,1,0,"0")

Result :
A B C
1 056695864
2 022489653
3
4

Senin, 01 Juni 2009

Shortcut for Pasting Only Values

One of the most often-used commands in Excel is the Paste Special option from the Edit menu, where you can figure out exactly how you want information pasted into a worksheet. On the Paste Special dialog box, the Values selection is undoubtedly the one used the most. Since pasting only values in this manner is used so often, you might think that Microsoft would provide a shortcut key to, well, just paste values.

Unfortunately, they don't provide one. There are ways around this, however. One way is to just create a toolbar button that pastes values for you. All you need to do is follow these steps in versions of Excel prior to Excel 2007:

1.Choose Customize from the Tools menu. Excel displays the Customize dialog box.
2.Make sure the Commands tab is selected.
3.In the list of Categories, select the Edit category.
4.In the list of Commands, select Paste Values.
5.Use the mouse to drag the Paste Values command from the Commands list to its new location on the toolbar. When you release the mouse button, the new icon appears on the toolbar.
6.Click on Close to dismiss the Customize dialog box.
If you are using Excel 2007, you can add the command to the Quick Access toolbar by following these steps:

1.Click the Office button and then click Excel Options. Excel displays the Excel Options dialog box.
2.At the left side of the dialog box click Customize.
3.Use the Choose Commands From drop-down list to choose All Commands.
4.In the list of commands, choose Paste Values.
5.Click the Add button. The command is copied to the right side of the screen.
6.Click OK.
Now, whenever you want to paste just the values, you can click on the new toolbar button.

If you don't want to use the mouse to paste values, then you can use the tried-and-true keyboard sequence to paste values: Alt+E, S, V, Enter (for versions of Excel prior to Excel 2007) or Alt, H, V, S, V, Enter (for Excel 2007). This sequence selects the menus and dialog box options necessary to paste values.

If you want a shorter keyboard shortcut, the best way to do it is to create a macro that does the pasting for you, and then make sure that you assign a keyboard shortcut to the macro. For instance, create the following simple macro:

Sub PasteVal()
Selection.PasteSpecial Paste:=xlValues
End Sub
Now, follow these steps:

1.Press Alt+F8 to display the Macro dialog box.
2.From the list of available macros, select the PasteVal macro you just created.
3.Click on Options. Excel displays the Macro Options dialog box. (Click here to see a related figure.)
4.In the Shortcut Key area, indicate the key you want used with the Ctrl key as your shortcut. For instance, if you want Ctrl+G to execute the macro, then enter a G in the Shortcut Key area.
5.Click on OK to close the Macro Options dialog box.
6.Click on Cancel to close the Macro dialog box.
Now, whenever you want to paste values, all you need to do is press Ctrl+G, the macro will be run, and the values in the Clipboard will be pasted to the selected cell.

Selasa, 26 Mei 2009

Copy formula from sheet1 to sheet2 with row automaticly modified

Copy a formula across multiple row so that the row value increments automatically but not the row value
For Example :

The cell Sheet2!B32, has a formula of: =Sheet1!C9
After copy/paste, Cell Sheet2!B33 should have: =Sheet1!C47
After copy/paste, Cell Sheet2!B34 should have: =Sheet1!C85
After copy/paste, Cell Sheet2!B35 should have: =Sheet1!C123

Try this formula Sheet2!B32:

=INDIRECT("Sheet1!C"&(ROW()-31)*38-29)

OR...

The cell Sheet2!B32, has a formula of: =Sheet1!C10
After copy/paste, Cell Sheet2!B33 should have: =Sheet1!C48
After copy/paste, Cell Sheet2!B34 should have: =Sheet1!C86
After copy/paste, Cell Sheet2!B35 should have: =Sheet1!C124

Tri this :

=INDIRECT("Sheet1!C"&(ROW()-31) * 38 - 28)

How it work?

=(ROW()-31) converts row32 back into a value of 1.

Your target cells are C10, C48, C86...that's 38 rows difference each time. So I multiply my starting value by 38:

=(ROW()-31) * 38
...or
=1 * 38 = 38

Then we have to adjust for the actual first cell, which is in row 10. Since our current total is 38 and we need it to be 10, we subtract 28:

=(ROW()-31) * 38 - 28
...or
=1 * 38 - 28 = 10

Now, when you copy that formula down, the next answer will be 48, then 86...so it's working for picking row numbers. Add that into the INDIRECT() formula and it creates the reference for you.

Senin, 25 Mei 2009

Excel Copy formula with row automatically modified

I am trying to figure out a means to copy a formula across multiple columns
so that the row value increments automatically but not the column value. For
example:

The first cell, A1, has a formula of: =Sheet1!K110
After copy/paste, Cell B1 should have: =Sheet1!K114
After copy/paste, Cell C1 should have: =Sheet1!K118
After copy/paste, Cell B1 should have: =Sheet1!K122

The sheet I am working on has probably 200 such cells so being able to do
this via copy/paste would be ideal compared to editing each cell one-by-one.

Try this:

=INDEX(Sheet1!$K110:$K300,COLUMNS($A1:A1)*4-3)

Copy across as needed. Adjust the end of range: $K300 as needed.

Here is another option:

=INDIRECT("Sheet1!K"&106+COLUMN()*4)