Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Filling out into cells

0

Hello,

I can't get my code to working,

It seems when we type a name we don't get all the results from that customer?

Also we get more results then the data we have

Hope someone can helpme out

Here is a demo workbook

It's on sheet1 on cell H5 after changing that cell it will get to the ArtDB sheet to get the data.

Thanks

Answer
Discuss

Answers

0
Selected Answer

I like your colour scheme. Please find the revised code in the attached workbook.

I didn't use your function in A11. It's better to let VBA do the search. It would also be better if you would introduce a drop-down in H5 from which you can select the customer name.

Anyway, for now it's working. Type a name and the data will be displayed. I'm looking forward to see what further improvements you will make.

Discuss

Discussion

Hello Variatus,

Thanks for your help once again :)
It seems we don't get all the results like for example Sam Nobody
Also i have added the updated file again ;)

Thanks
GhostofWanted (rep: 46) Mar 11, '21 at 9:48 pm
Hi,
Your sample has Sam Noboldy selected and filled. I replaced it with Rick Tiger and then brought back Sam Nobody. Both changes were executed perfecty. Your system is prone to typos. When the useer doesnt spell the name correctly failure can't be avoided.
You may have confidence in the code. It works without flaw. However, you should replace the manual typing with a list to select from with a click.
Variatus (rep: 4889) Mar 12, '21 at 2:09 am
hello,

I did replaced the manual typing with a drop value.
But still can't manage to get all the data from Sam nobody
Because he has 2 lines :D and i get only 1
any ideas please.
GhostofWanted (rep: 46) Mar 13, '21 at 7:11 am
Aah! I didn't see that. I have amended the code to support multiple results.
Variatus (rep: 4889) Mar 13, '21 at 10:52 pm
awesome :)
Thanks Variatus
GhostofWanted (rep: 46) Mar 14, '21 at 4:37 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login