English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories
0

How can I record a macro where....

When I press a button, it puts a 1 in a cell, then moves onto the next cell, press the button it puts another 1 in and continues??

2007-09-25 00:32:30 · 4 answers · asked by marty m 1 in Computers & Internet Software

4 answers

Run one or more online tutorials.

http://www.google.com/search?hl=en&q=create+excel+macro+tutorial

Sometimes you don't need macros, you just need to understand how to use the FILL HANDLE.

If you want to populate several adjacent cells with a series, try the fill handle before you try macros.

Here's an example. In one cell you type 10. Below it you type 20. Below that you type 30. Select all three cells. Excel puts a rectangle around the 3 selected cells.

The bottom right corner of the rectangle has a tiny square. Place your cursor on the "fill handle" square and drag it straight down for several more cells. Release the fill handle.

Excel will auto populate a series like 10,20,30 with 40,50,60 ...

As you left click on the fill handle and hold your mouse key down while dragging the fill handle, you will see the data that is being entered in a kind of pop up rectangle attached to the cursor.

It can replicate a large number of patterns including dates.

In your case, you need to start the series with 1 1 1 . Then Excel knows not to fill with 1,2,3,4 or any other series that starts with a 1.

Let's say you change the 2nd one to red and the third one to blue. What's the pattern? Black, red, blue 1's. You can replicate PATTERNS including horizontal green bars.

As an experiment, I just tried 10,20,40 expecting 80, 160, 320 to follow.

Excel said:
10
20
40
53.33333333
68.33333333
83.33333333
98.33333333
113.3333333

??

2007-09-25 00:47:52 · answer #1 · answered by Anonymous · 0 0

You can't really record a macro like that, but you can create one like that.

What I recommend doing is opening the Control Toolbox toolbar and Visual Basic toolbar, then selecting the Command Button tool from the Control Toolbox toolbar and inserting a command button. Then right click the command button you inserted and select Properties from the shortcut list. In the Properties window change the value for Caption to whatever text you would like on the command button, then close the Properties window.

Right select the command button again and select View Code.

Now you enter the following code where your cursor is if you want to enter 1 in the cell and move 1 space right:

ActiveCell.Value = 1
ActiveCell.Offset(0, 1).Activate

If you want to enter 1 in the cell and move 1 space down, then enter:

ActiveCell.Value = 1
ActiveCell.Offset(1, 0).Activate

Then exit the Visual Basic Editor window.

After you're all done entering the code, click the button that looks like a drafting triange on the Visual Basic toolbar to exit design mode for the command button. Now when you click the button it should enter 1 and move to the cell you want it to.

If you don't want the Command Button to print out when you print the worksheet, in the Properties window change the Print Object property for the command button to false while changing the caption for the button.

The first number after offset tells Excel how far to move up or down as far as rows. The second number tells Excel how many columns to move left or right. Your active cell is the cell that is selected.

2007-09-26 03:25:03 · answer #2 · answered by devilishblueyes 7 · 0 0

you are able to convert pdf to excel format, however the macro VBA won't paintings interior the switched over excel. in basic terms use a pdf to excel converter, google it, you will locate many, for my area utilising simpo pdf to excel, you may provide it a attempt.

2016-10-09 19:41:52 · answer #3 · answered by liptak 4 · 0 0

marty try this link

http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-US%3AIE-Address&rlz=1I7ADBF&q=How+to+create+Excel+Macro&btnG=Search

2007-09-25 00:36:31 · answer #4 · answered by Joe_Young 6 · 0 0

fedest.com, questions and answers