Page 1 of 1

Using macro to find information.

PostPosted: Mon Jul 18, 2016 4:00 am
by hank_shakti
Hi everyone,

I have an online business and I can down load sales information file every day. But, this file missing three important information. So, I thought that I can create macro to find those information from the inventory file. So, first I copy the inventory file in sheet 1 and uploaded sales file in sheet 2. I copied the sku from the sheet 2 and open find window in sheet 1 and paste the sku on it and find it. Then I copied those three information and move to sheet 2 and paste it to the appropriate position. It worked well, but Idea was to change the sales file everyday and do the same process everyday. But my macro is using the same sales file of which the original macro process was saved, even though I uploaded a new sales file to the sheet 2. Is there anyway, macro handle the same process on the new data set?

Re: Using macro to find information.

PostPosted: Mon Jul 18, 2016 4:36 am
by MrProgrammer
Hi, and welcome to the forum. I don't think you need an evil macro. Copy the matching data from sheet 1 to sheet 2 using the VLOOKUP formula.

[Tutorial] VLOOKUP questions and answers

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.

Re: Using macro to find information.

PostPosted: Mon Jul 18, 2016 5:36 am
by hank_shakti
Thank you for your welcoming message and the potential answer. I am going to test it out. Thank you again!

Re: Using macro to find information.

PostPosted: Mon Jul 18, 2016 6:39 am
by hank_shakti
I have tried several times. This is the formula: =VLOOKUP(Sold.E2;$B$2:$H$77728;5;0). It correctly identify the sku and the information that I am looking for. But, it write the output on the sheet 1. Do I have any control where output should go? I want the output written on the sheet2, the same row with the sku that I am looking for.

Regards,

hank

Re: Using macro to find information.

PostPosted: Mon Jul 18, 2016 6:06 pm
by MrProgrammer
hank_shakti wrote:Do I have any control where output should go?
You put the formula in the cell where you want the result to be displayed. So if the output should be displayed on sheet 2, the formula must go on sheet 2. Read section 8. Using formulas and cell references in Ten concepts that every Calc user should know, specifically the fourth sentence in the section. Based on that question, you should probably read the entire tutorial. I think you will learn a lot from it.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.

Re: Using macro to find information.

PostPosted: Mon Jul 18, 2016 6:41 pm
by hank_shakti
Thank you! I will do my home work and let you know how it goes. Best regards, hank

Re: Using macro to find information.

PostPosted: Tue Jul 19, 2016 2:32 am
by hank_shakti
Hi MrProgrammer,

I struggled for all the last weekend saving numerous frustrating macro trials, you solved it in five minutes after I read your last instruction. Thank you so much for your advice, you saved us about 1 hr day for sorting printed out packing slips by sku for picking.

Special regards,

hank