Computing.Net > Forums > Programming > VB macro: Excel: lookup record

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB macro: Excel: lookup record

Reply to Message Icon

Name: fish
Date: January 16, 2009 at 04:14:59 Pacific
OS: Windows Vista
CPU/Ram: 3 gb
Product: Dell / Inpiron 1525
Subcategory: General
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: reno
Date: January 21, 2009 at 02:34:49 Pacific
Reply:

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.


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB macro: Excel: lookup record

Excel VB Macro. Big copy www.computing.net/answers/programming/excel-vb-macro-big-copy/1444.html

VB macro www.computing.net/answers/programming/vb-macro/16000.html

VB Excel applications question www.computing.net/answers/programming/vb-excel-applications-question/2765.html