Using formula in a macro?

  • Thread starter Thread starter Lonpuz
  • Start date Start date
L

Lonpuz

I am able to use the macro recorder to navigate and execute simple things. I
need to be able to use formula (specifically VLOOKUP) in my macro, and don't
know how to do it. Made a post earlier, but perhaps it was too vague as I
have yet to see any ideas. (Jan 20 >Need to paste/update info to correct row.)

1. I have a row of information that begins with a number.
2. I need a macro to find the same number in the beginning of a list of
numbers all in the same column, and then select that cell.

I can then copy/paste the new information over the old in the correct row.
Hope that makes more sense.

Lonpuz
 
I need a macro

The group doesn't function terribly well as a free macro writing service;
it's more of help to those who help themselves kind of thing.

I suspect you could get by very well with the built-in Find feature. Copy
your data and select the search range (col A evidently). Ctrl-f to open the
Find dialog and enter your number. Click "Match entire cell contents". At
your first hit press Esc to close Find and then Ctrl-v to paste. Then press
Shift-F4 to get your next match, Ctrl-v, etc.

--
Jim
|I am able to use the macro recorder to navigate and execute simple things.
I
| need to be able to use formula (specifically VLOOKUP) in my macro, and
don't
| know how to do it. Made a post earlier, but perhaps it was too vague as I
| have yet to see any ideas. (Jan 20 >Need to paste/update info to correct
row.)
|
| 1. I have a row of information that begins with a number.
| 2. I need a macro to find the same number in the beginning of a list of
| numbers all in the same column, and then select that cell.
|
| I can then copy/paste the new information over the old in the correct row.
| Hope that makes more sense.
|
| Lonpuz
 
Thanks Jim.

Jim Rech said:
The group doesn't function terribly well as a free macro writing service;
it's more of help to those who help themselves kind of thing.

I suspect you could get by very well with the built-in Find feature. Copy
your data and select the search range (col A evidently). Ctrl-f to open the
Find dialog and enter your number. Click "Match entire cell contents". At
your first hit press Esc to close Find and then Ctrl-v to paste. Then press
Shift-F4 to get your next match, Ctrl-v, etc.

--
Jim
|I am able to use the macro recorder to navigate and execute simple things.
I
| need to be able to use formula (specifically VLOOKUP) in my macro, and
don't
| know how to do it. Made a post earlier, but perhaps it was too vague as I
| have yet to see any ideas. (Jan 20 >Need to paste/update info to correct
row.)
|
| 1. I have a row of information that begins with a number.
| 2. I need a macro to find the same number in the beginning of a list of
| numbers all in the same column, and then select that cell.
|
| I can then copy/paste the new information over the old in the correct row.
| Hope that makes more sense.
|
| Lonpuz
 

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

Back
Top