Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Dynamic Price Change Calculation

Try this formula: =IF(C2="Buy",(B2/INDEX(INDIRECT("B"&ROW()&":B65536"),MATCH(0,INDIRE CT("D"&ROW()&":D65536"),0)))-1,"")

What the formula is based on is that the first "BUY" in the series always turns out to be zero. That's what the match performs. I have to slide the match down a row for each new comparison (otherwise it always finds the FIRST zero and not necessarily the first zero in the series). So thats what the indirect and row() functions do.

I use index off the same relative range.

Anyway, I tried it with the data you provided and it seems to work.

---
frmsrcurl: http://msgroups.net/microsoft.public...ge-Calculation
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
Calculation based on lowest price [email protected] Excel Discussion (Misc queries) 6 December 11th 07 09:47 PM
Price calculation - rounding Orninn Excel Discussion (Misc queries) 6 January 23rd 07 04:10 PM
Price function difference in Output formula vis a vis Manual Calculation abhi_23 Excel Worksheet Functions 0 January 17th 06 07:57 AM
SUMIF function in "Price quote with tax calculation" templae Peter Excel Worksheet Functions 6 October 3rd 05 07:18 PM
Excel spreadsheet/template for developing a retail price calculation breeze Excel Programming 5 July 29th 04 08:19 PM


All times are GMT +1. The time now is 11:05 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"