PPRuNe Forums - View Single Post - Help with Excel spreadsheet please
View Single Post
Old 12th January 2007 | 13:21
  #5 (permalink)  
Agent86
20 Anniversary
 
Joined: Mar 2003
Posts: 195
Likes: 2
From: Aus
If you are willing to dive into a bit of Visual basic try this
From Excel press Alt F11 to open the VBA editor
Rt click on your project and insert => Module
Paste this bit of code
Function markup(cost)
Select Case cost
Case Is < 1
markup = cost * 2
Case 1 To 5
markup = cost * 1.5
Case 5 To 50
markup = cost * 1.3
Case 50 To 99
markup = cost * 1.2
Case Else
markup = cost
End Select
End Function
Then all you need to type in the display field is =markup(xx) where xx is the cell you want the calc to work on.
I have assumed if >100 quid then no mark up (the Case else line)
Steep learning curve but VBA can make excel sing!
Agent86 is offline  
Reply