You are here:

Excel/EXCEL VLOOKUP or Macro question


QUESTION: Hi, Tom. You have helped me in the past, and I'm coming back for more! I understand VLOOKUPS, Macros and VBA, but I'm not an expert in writing this code.
I'm not sure if I'll have enough room to get this all on the page, so I'll summarize. Please let me know if you need more info.
I have three sheets which I'll call SHEET1, SHEET2 and SHEET3. SHEET3 has all my data in a list, SHEET1 is where I input values in certain cells, and SHEET2 is where I'd like the calculations to formulate.
SHEET3, Column C has LIST Price and Column E has NET price. Columns F, G and H have Service Contract price, based on distance from our site (Zones A, B and C).
SHEET1, cell G12 is a LIST value, where I choose TRUE or FALSE for the Price
SHEET1, cell G33 i input a distance (25, 50, 75 etc) which will determine the Zone A, B or C
SHEET2, Columns E and F now equal columns E and F on SHEET3. In Column I on SHEET2, I would like it to lookup the corresponding line on SHEET3, then reference SHEET1 cell G12, and if it's TRUE insert SHEET3 Column C and if FALSE Column E. Also on SHEET2, in Column N, I would like it to lookup the same line, and if SHEET1, cell G33 is less than 50, input SHEET3 column F, if between 51 and 100, SHEET3 Column G, and if over 100 SHEET3 Column H. I realize it might be easier if I use a Named Range for SHEET3. Any help you can give me would be appreciated. Please let me know if you need any more clarification.
Thank you

ANSWER: Charles,

Can you send me the workbook to look at - a little hard to visualize all this from a description.  

you can send it to

Tom Ogilvy

---------- FOLLOW-UP ----------

QUESTION: Hi, Tom. Thanks again fro looking at this. I just sent you the email with the file, to your MSN account. I zipped the file, because it contains macros already. The email will be coming from , so you can check your spam filter if it doesn't arrive.
Thanks again


the file arrived, but I don't have anything that opens a rar file.  Try just sending it as an xlsm or xls file.  Having macros in it shouldn't make any difference (I have received plenty of files that have macros).

If you want to compress it, make it a zip file.

Tom Ogilvy

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 All rights reserved.