Excel macro

D

Dhimant

I'm trying to create a macro for a table where I want macro to prompt in
cell A1 and after entering a number and pressing 'enter' I want cursor
to move to cell B1 and prompt for another entry, and after entering and
pressing 'enter' cursor should go to cell C1 and prompt . After
entering and pressing 'enter' I want cursor to go to cell A2 and repeat
as above steps. I tried all different ways but don't know how to have
macro prompt?
Any hints or help will be apprecieted.
 
A

Arvi Laanemets

Hi

A copy-paste from Tom Oglivy
***
select your cells in the order you desire, starting with the second cell in
the sequence and ending with the first. Hold the control key down while you
do this to expand the selection.

Then go to the name box in the upper left corner and enter

Order1

and hit return

This names the select range Order1 (use any legal name you want).


If you use just the tab key, you will tab through the range in the same
order you selected the cells. Any time you need to do this, select the
defined name from the name box dropdown.
***

It works when the number of cells you want to access, is fixed. Another way,
which works always, is:
Before you enter data, select the whole would-be datarange. Now enter your
data - ending every entry with Tab moves cursor in selected area row-wise,
ending with Enter column-wise.


Arvi Laanemets
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top