Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparing the active cell value against another value in the row
I have two values in a row, I want to click on the active cell and have it
display a calculation based on the value in the active cell versus a fixed cell in the same row. I have tried to use the msgbox function but can't seem to make it work. The values are consist of a customer discount off list versus a dealer discount off list. I need to calculate the margin based on these two values. The formula is 1-((1-dealer discount)/(1-customer discount)). Can this be done in Visual basic? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparing the active cell value against another value in the row
I would suggest a simple macro based upon the Worksheet_SelectionChange event Something like Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target = "" Then Exit Sub MsgBox Target - Range("A1") End Sub for a simple subtraction which you can amend for your specific formula. -- mrice Research Scientist with many years of spreadsheet development experience ------------------------------------------------------------------------ mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931 View this thread: http://www.excelforum.com/showthread...hreadid=549171 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Active cell moves off the screen | Excel Discussion (Misc queries) | |||
Active Cell displayed in another cell? | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions | |||
Woorksheet locked on active cell | Excel Worksheet Functions | |||
Highlight Active Cell...With a Diffrence | Excel Discussion (Misc queries) |