Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default formula based on prefix

Hi

I need a different markup formula based on prefix in inventory list ie:

ppbolt would get 15% markup (prefix is pp) (Description)
detnut would get 20% markup (prefix is det) (Item Code)
3rnail would get 25% markup (prefix is 3) (Item Code)

col A would be item code
col B would be description (the pp prefix is on some of the items here)
col C would be cost
col D would be retail

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default formula based on prefix

Create a table on the side, two columns, like so:

A B
pp 0.15
det 0.20
3 0.25

Now you can write a formula to analyze the first few letters of each
inventory. Let's say inventory list starts at D1, and the cost for each
inventory is at E1:

=E1+E1*(IF(LEFT($D1,3)="det",VLOOKUP($D1,$A$1:$B$3 ,2,FALSE),IF(LEFT($D1,2)="pp",VLOOKUP($D1,$A$1:$B$ 3,2,FALSE),IF(LEFT($D1,1)="3",VLOOKUP($D1,$A$1:$B$ 3,2,FALSE),0))))



splat wrote:
Hi

I need a different markup formula based on prefix in inventory list ie:

ppbolt would get 15% markup (prefix is pp) (Description)
detnut would get 20% markup (prefix is det) (Item Code)
3rnail would get 25% markup (prefix is 3) (Item Code)

col A would be item code
col B would be description (the pp prefix is on some of the items here)
col C would be cost
col D would be retail

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default formula based on prefix

Sorry, didn't see your desire for specific columns - you'll need to
change to suit your needs. All that the formula is doing is looking at
either the first, first two, or first three letters and comparing it to
an exact match (FALSE) in a vlookup table, then returning that value
and adding it * the cost of the item to the original cost.

S Davis wrote:
Create a table on the side, two columns, like so:

A B
pp 0.15
det 0.20
3 0.25

Now you can write a formula to analyze the first few letters of each
inventory. Let's say inventory list starts at D1, and the cost for each
inventory is at E1:

=E1+E1*(IF(LEFT($D1,3)="det",VLOOKUP($D1,$A$1:$B$3 ,2,FALSE),IF(LEFT($D1,2)="pp",VLOOKUP($D1,$A$1:$B$ 3,2,FALSE),IF(LEFT($D1,1)="3",VLOOKUP($D1,$A$1:$B$ 3,2,FALSE),0))))



splat wrote:
Hi

I need a different markup formula based on prefix in inventory list ie:

ppbolt would get 15% markup (prefix is pp) (Description)
detnut would get 20% markup (prefix is det) (Item Code)
3rnail would get 25% markup (prefix is 3) (Item Code)

col A would be item code
col B would be description (the pp prefix is on some of the items here)
col C would be cost
col D would be retail

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default formula based on prefix

I'm not coming right with these formulas, please help.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default formula based on prefix

over then add another then down.

--
Regards,
Tom Ogilvy

"splat" wrote in message
s.com...
I'm not coming right with these formulas, please help.



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
Autofill data based on an assigned code/prefix anrcreations Excel Worksheet Functions 2 February 11th 10 07:50 PM
Prefix dleo Excel Discussion (Misc queries) 0 July 1st 09 05:18 PM
SUM without prefix Boris Excel Discussion (Misc queries) 3 January 2nd 08 11:40 AM
+= prefix to formula JJDuffin Excel Discussion (Misc queries) 7 August 3rd 05 04:42 PM
Adding a prefix to a cell by using a formula Audrey in OHIO Excel Discussion (Misc queries) 4 February 24th 05 04:49 PM


All times are GMT +1. The time now is 04:06 AM.

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

About Us

"It's about Microsoft Excel"