Using macro to find information.

The Application Programming Interface and the OASIS Open Document Format

Using macro to find information.

Postby hank_shakti » Mon Jul 18, 2016 4:00 am

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?
open office 4.1.2, Window 10
hank_shakti
 
Posts: 5
Joined: Mon Jul 18, 2016 3:43 am

Re: Using macro to find information.

Postby MrProgrammer » Mon Jul 18, 2016 4:36 am

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.
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3898
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Using macro to find information.

Postby hank_shakti » Mon Jul 18, 2016 5:36 am

Thank you for your welcoming message and the potential answer. I am going to test it out. Thank you again!
open office 4.1.2, Window 10
hank_shakti
 
Posts: 5
Joined: Mon Jul 18, 2016 3:43 am

Re: Using macro to find information.

Postby hank_shakti » Mon Jul 18, 2016 6:39 am

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
open office 4.1.2, Window 10
hank_shakti
 
Posts: 5
Joined: Mon Jul 18, 2016 3:43 am

Re: Using macro to find information.

Postby MrProgrammer » Mon Jul 18, 2016 6:06 pm

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.
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3898
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Using macro to find information.

Postby hank_shakti » Mon Jul 18, 2016 6:41 pm

Thank you! I will do my home work and let you know how it goes. Best regards, hank
open office 4.1.2, Window 10
hank_shakti
 
Posts: 5
Joined: Mon Jul 18, 2016 3:43 am

Re: Using macro to find information.

Postby hank_shakti » Tue Jul 19, 2016 2:32 am

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
open office 4.1.2, Window 10
hank_shakti
 
Posts: 5
Joined: Mon Jul 18, 2016 3:43 am


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 2 guests