Can anyone create a macro for me?

tarmand

Board Regular
Joined
Jul 11, 2002
Messages
196
As hard as I try to understand Macros language, I just don't I am hoping someone can help me with something I think should be easy to do, but I don't know how to word it. Here's my scenario:

I have three reports that I download from GSAP each month. One is just an order listing that lists all orders and their descriptions on my project. The others, pull the order costs in different formats but do not list the order description. I use these reports to creat pivot tables for my managers to review. I need a macro that will read the order number in the other two reports and then look at the order list and pull the description for that order.

For instance, on both reports, the order number is listed in column "C". I need a macro to tell both of those worksheets to look on the worksheet entitled "Order list" in the same workbook and pull the description related to that order. In the order list, the orders are in column "A" and the description is in column "C". I then want it to insert a column "D" into both of the worksheets and list the description of the order. All reports have headers on line one and the data starts on line two. There are no empty lines, but one of the reports may occasionally have an empty order number.

Is this something that could be done relatively easily? Would someone be willing to help me with this. If so, and you love a challenge, I would love to go further with these reports, but again, I don't understand the wording of Macros and would need someone to put what I say into "Macro Language".

Thanks in advance for anyone's help.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Perhaps a starting point is for you to record a macro doing exactly what you want. Then post that code here (using the code tags). Obviously it will need fine tuning. But then we can have something to see what you are trying to do.
 
Upvote 0
shades said:
Perhaps a starting point is for you to record a macro doing exactly what you want. Then post that code here (using the code tags). Obviously it will need fine tuning. But then we can have something to see what you are trying to do.

What is really sad is that I am not advanced enough to even record that macro. I don't know how I would tell it to look at my order number, find it on the other sheet and copy the information from another column on the same line and insert it into the original document. I just tried to do it manually, but that won't work because I am the one finding the information on the other sheet, not the computer. Does that make sense?
 
Upvote 0
tarmand said:
What is really sad is that I am not advanced enough to even record that macro.

Not sad - all of us started at this point. Do you know how to record a macro?

I don't know how I would tell it to look at my order number, find it on the other sheet and copy the information from another column on the same line and insert it into the original document. I just tried to do it manually, but that won't work because I am the one finding the information on the other sheet, not the computer. Does that make sense?

When you do this manually, follow the same steps when recording the macro. Keep in mind which one you are looking up. That will be useful when you expand the macro.
 
Upvote 0
shades said:
tarmand said:
What is really sad is that I am not advanced enough to even record that macro.

Not sad - all of us started at this point. Do you know how to record a macro?

I don't know how I would tell it to look at my order number, find it on the other sheet and copy the information from another column on the same line and insert it into the original document. I just tried to do it manually, but that won't work because I am the one finding the information on the other sheet, not the computer. Does that make sense?

When you do this manually, follow the same steps when recording the macro. Keep in mind which one you are looking up. That will be useful when you expand the macro.


Is this what you wanted?


Sub lookup()
'
' lookup Macro
' Macro recorded 1/17/2005 by tammie.armand
'

'
Columns("D:D").Select
Selection.Insert Shift:=xlToRight
Range("D2").Select
ActiveCell.FormulaR1C1 = "='Order List'!C2"
Range("D3").Select
End Sub
 
Upvote 0
Maybe I'm missing something, but why not just use VLOOKUP?

If that works, post the formula that you get and code can be written to add it to your sheet automatically.

Smitty
 
Upvote 0
pennysaver said:
Maybe I'm missing something, but why not just use VLOOKUP?

If that works, post the formula that you get and code can be written to add it to your sheet automatically.

Smitty

Okay, since I don't know what VLOOKUP is, I'm off to do a search. I'll let you know what happens!
 
Upvote 0
Okay,

I put this in D2 of the page I want the information in and it doesn't do anything. What am I doing wrong?

=VLOOKUP(C2,'Order List'!A2:C31,3,false)
 
Upvote 0
Are you getting an error?

Smitty

I tried to e-mail you an example, but it got bounced back.
 
Upvote 0

Forum statistics

Threads
1,207,261
Messages
6,077,363
Members
446,280
Latest member
Danielosama

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top