Getting Data From Sheet
Hey,
I made an invoice system that generate invoices. I did it in excel, and now I want to do it as macro. So far it going good to me, but I have problem. I have a sheet that his name is "Comapny Info". I need that when I put the name of the company in the cell, it will ge details from the sheet. I need it to work like Vlookup, but not with the Vlookup function. Give an exmple: Col A is company name - That I want to find. after i find to name i want to take from col B and Col C the contac name and from col B and phone from Col C. Thanks for your help, SlideMan -- Message posted from http://www.ExcelForum.com |
Getting Data From Sheet
Turn on the macro recorder and go to the Company Info sheet. Then do
Edit=Find and enter the company name. After it finds the company name, then turn off the macro recorder. You can now generalize the code to pass it the name of a company to find and remove the select and activate commands so you get a reference to the found cell. Now you can use that with Offset to retrieve the information you need. -- Regards, Tom Ogilvy slideman wrote in message ... Hey, I made an invoice system that generate invoices. I did it in excel, and now I want to do it as macro. So far it going good to me, but I have problem. I have a sheet that his name is "Comapny Info". I need that when I put the name of the company in the cell, it will get details from the sheet. I need it to work like Vlookup, but not with the Vlookup function. Give an exmple: Col A is company name - That I want to find. after i find to name i want to take from col B and Col C the contact name and from col B and phone from Col C. Thanks for your help, SlideMan. --- Message posted from http://www.ExcelForum.com/ |
Getting Data From Sheet
I still didn't understand how can I get the cell number/Ref
-- Message posted from http://www.ExcelForum.com |
Getting Data From Sheet
SlideMan,
Attached is an example. I hope it does, what you need. There may be a need of small changes, to make it do exactly what you want. It's quite a simple macro. The only thing, which may put you in some trouble (if you're not experienced in programming) is the logical pointer. Attachment filename: searchinvoicesexample.xls Download attachment: http://www.excelforum.com/attachment.php?postid=420318 --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 08:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com