Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 sheets in my workbook. Sheet1 is a stock list (item and price in
adjacent column): A B 1 Screen 200 2 Speakers 50 3 Keyboard 20 etc. Sheet2 contains items manually selected from Sheet1 in column A: A B 1 =Sheet1!A1 ?? 2 =Sheet1!A99 ?? I want B1 on Sheet2 to contain the price associated with the formula in A1. I can't do a straightforward drag cell formula from A1 to B1 (to get =Sheet1!B1) because the user can change the cell reference in A1 and I want B1 to automatically update with the correct price. Similarly B2 should contain the price associated with the formula in A2. I think this requires a user-defined function, e.g. B1 would contain =getPrice(A1). Function getPrice(itemCell As range) As Integer item = itemCell.Formula End Function and parse the formula to get the price from Sheet1, same row, column+1, but don't know how to proceed. Any help much appreciated. Cheers. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula/Function for parsing data | Excel Worksheet Functions | |||
parsing a formula... | Excel Discussion (Misc queries) | |||
parsing a cell using | | Excel Worksheet Functions | |||
Name parsing formula.. | Excel Programming | |||
Parsing Data w/ a Formula (another question) | Excel Worksheet Functions |