Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Dear programmers,
I need a macro that can lookup a record in a database (A) (this database can easily be modified if it needs to be) and insert the record into a specific cell in a database (B). It then has to look up the following record (in database (A)) and insert it on the next sheet (in the same position as the previous e.g. column B, Row 3) in database (B).
I am working in Excel from M.S. Office 2007. In this database file there is an existing Visual Basic macro(generated by someone more clever than myself). By pushing the 'button' on the first page the macro is activated.- As I understand, it copies certain parts of a template (sheet 1) and displays it in a new sheet with a subsequent number as the sheet name. It may do a few more smaller bits and bobs that I am oblivious to or irrelevant.
I am hoping that there may be a Samaritan out there who would not mind divulging some clever code to save me a lot of time for a otherwise long repetitive process.
Ideally, I would like to add the code from 'lookup record and insert on new sheet' macro to happen with the same push of the 'button' of the existing macro.
If I am asking something way more complicated than I am aware of - please excuse my ignorance and accept my humble apology- as I have virtually no programming knowledge.
Thanks

i dont really understand what you are trying to achieve.
but to lookup value in another sheet, use VLOOKUP() or HLOOKUP() function.
if you want to use macro, look in the help file for worksheet object and cell object.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |