You are here:
I can answer questions relating to MS Excel formulas, or to programming with vba (Visual Basic for Applications) in the Excel environment. Please follow the following guidelines: your question should focus on one specific issue you want to learn. It's beyond the scope of this free service for me to create entire projects or complex vba solutions for you from scratch. You should be able to do most of the work yourself, and come here when you need help with a specific point you're stuck on. ALWAYS include a simple, concrete example illustrating what you want to learn. Explain this example in detail in the text of your question (what data is in which cells of which sheets, etc). Be very precise about the results you want, using this sample to make the logic clear. Always keep these examples SIMPLE. Never e.g. use 18 worksheets in your example if using 2 or 3 will do. Never use ranges like AI567:BB865 if using a range like A1:B3 will do. Thanks.
As a consultant, I've designed Excel tools since the 90s, working for the Federal Reserve Bank, AT&T, and (currently) Gap Inc.
My only "education" comes from 2 decades of doing spreadsheet/programming work, with major SF Bay Area corporations such as AT&T, Federal Reserve Bank, and Gap Inc.
| User | Date | K | C | T | P | Comments |
|---|---|---|---|---|---|---|
| Kevin | 02/08/10 | 10 | 10 | 10 | 10 | Stuart, Thank you an excellent response upon ..... |
| Phuong | 02/02/10 | 10 | 10 | 10 | 10 | |
| John | 02/02/10 | 10 | 10 | 10 | 10 | Thank you for such a quick reply! ..... |
| Mark | 01/28/10 | 10 | 10 | 10 | 10 | Fast, and how! Excellent and accurate! |
| Chris | 01/18/10 | 10 | 10 | 10 | 10 | Thank you! |
The line of code nearestLookup = rngRow.Offset(0, 1) means that when the value in col B is matched, the function should return the value one col to its right (col C). If you wanted instead to match
If you understand vba (Visual Basic for Applications, aka "macros"), then this is possible. If you don't understand vba, it's not possible. In Excel 2007, on the Developer tab, under Insert, use the
Sub makeVBAlisting() 'IMPORTANT! in the VBE select Tools, References and check the 'Microsoft Visual Basic for Applications Extensibility X.X Dim vbproj As VBProject Dim vbcomp As VBComponent
Do you know how to use Visual Basic for Applications (vba, sometimes called "macros")? If not, it's impossible to accomplish this task. If so... Open new Excel workbook. Enter your example table in
Create a new workbook. Enter your example data ON THE SHEET NAMED Sheet1. Go to the Visual Basic Editor. On the ThisWorkbook object, add the code: Private Sub Workbook_Open() Dim wks As Worksheet
Answers by Expert:

©2010 About.com, a part of The New York Times Company. All rights reserved.