ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using formula in a macro? (https://www.excelbanter.com/excel-programming/404668-using-formula-macro.html)

Lonpuz

Using formula in a macro?
 
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

Jim Rech[_2_]

Using formula in a macro?
 
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
"Lonpuz" wrote in message
...
|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



Lonpuz

Using formula in a macro?
 
Thanks Jim.

"Jim Rech" wrote:

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
"Lonpuz" wrote in message
...
|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





All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com