Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro lookup columns
Hi all,
I'm trying to prepare a macro that allows me to look up information from one sheet. The problem I'm having is that the columns from the data sheet are not always in the same order. For example: Fruits City $ Apple Miami 1000 Orange Miami 500 Apple Tallahassee 280 Apple Orlando 640 Banana Orlando 200 Orange Tallahassee 930 In the other sheet I need to calculate how much money is earned by city. So I need to look up in this sheet the column that contains the cities (not always in the same column) and look up the $ (not always in the same column also). Is there a way to do this? Please let me know if I'm not clear enough and I will explain it better. Thank you in advance for your help!! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro lookup columns
Thanks for your answer!
Do you know how I can use that function in order to refer to another sheet in the same workbook? and how can I use it with a sumif in order to sum all the $ for the same city? Thank you again "Don Guillett" wrote: something like? x=cells.find("Miami").offset(,1) -- Don Guillett SalesAid Software "Martincito23" wrote in message ... Hi all, I'm trying to prepare a macro that allows me to look up information from one sheet. The problem I'm having is that the columns from the data sheet are not always in the same order. For example: Fruits City $ Apple Miami 1000 Orange Miami 500 Apple Tallahassee 280 Apple Orlando 640 Banana Orlando 200 Orange Tallahassee 930 In the other sheet I need to calculate how much money is earned by city. So I need to look up in this sheet the column that contains the cities (not always in the same column) and look up the $ (not always in the same column also). Is there a way to do this? Please let me know if I'm not clear enough and I will explain it better. Thank you in advance for your help!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro that will hidden columns, rows and worksheets based on an identifier | Excel Discussion (Misc queries) | |||
Macro to Split Window in Same Place Even If Columns Added or Hidde | Excel Discussion (Misc queries) | |||
Macro lookup is not working good? | Excel Discussion (Misc queries) | |||
insert columns macro is putting 2 columns instead of 1 | Excel Worksheet Functions | |||
Lookup Data in Several Columns | Excel Worksheet Functions |