Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lou New At Excel
 
Posts: n/a
Default Recording a high price on a worksheet

I need to know the highest price I have ever paid for a product. In my
inventory, I update prices monthly, changing the previously recorded price.
If the "new price" is more than the price recorded in the "high price"
column, I want that price to change to the "new Price" amount. I have tried
using the MAX formula in conjunction with the IF formula, but it is not
working properly because if the "New Price" is in between the two prices, it
records that "new price". Any suggestions? Note: I am pretty much a novice
at this so please try to keep it simple.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default Recording a high price on a worksheet

You will need some VBA code.

Right-click on tab name,
Paste following code
Adjust Range("A:A") to suit your own "new price" column (eg: "G:G")
Close VBA

Et voilà!

I reckon it is not as simple as you could expect!

HTH
--
AP

'-----------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRange As Range
Dim myCell As Range
Set myRange = Intersect(Target, Range("A:A"))
If Not myRange Is Nothing Then
For Each myCell In myRange
With myCell
If .Value .Offset(0, 1).Value Then _
.Offset(0, 1).Value = .Value
End With
Next myCell
End If

End Sub

"Lou New At Excel" <Lou New At a écrit dans
le message de ...
I need to know the highest price I have ever paid for a product. In my
inventory, I update prices monthly, changing the previously recorded

price.
If the "new price" is more than the price recorded in the "high price"
column, I want that price to change to the "new Price" amount. I have

tried
using the MAX formula in conjunction with the IF formula, but it is not
working properly because if the "New Price" is in between the two prices,

it
records that "new price". Any suggestions? Note: I am pretty much a

novice
at this so please try to keep it simple.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet name / reference as a formula? gabriel_e Excel Discussion (Misc queries) 4 January 24th 06 12:23 PM
How do I reference data from one worksheet to another using combob caricc New Users to Excel 0 December 17th 05 09:58 PM
Search a worksheet, extract rows using a list from another sheet bobf Excel Discussion (Misc queries) 9 August 31st 05 04:56 AM
MSNStockQuote Function Parameters Bobtarrel Excel Worksheet Functions 2 July 17th 05 02:36 PM
Can it be done Luke Dallman Excel Worksheet Functions 10 January 20th 05 02:27 AM


All times are GMT +1. The time now is 05:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"