VB Code To Pick Best Pricing By Qty Column

Aug 20, 2008

I receive hundreds of part numbers to quote daily. I send out RFQ's to my suppliers and they respond with pricing. I gather all the data into a similar excel sheet below and assign the wining supplier.

in automating a task that will compare the group of data for best pricing and populate a "WIN" code in column "A" if that supplier was chosen for the that qty pricing.

Here is the excel example.

******** ******************** ************************************************************************>Microsoft Excel - Book1___Running: 11.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutI22=ABCDEFGHI1Scenario #1 - Supplier chosen for best pricing based on column "E"        2WINNERPART#VEN IDBRK1COST1BRK2COST2BRK3COST33 123ALL90110510107.54 123FO3511258107.755 123RO501958.51086WIN123AR651858.751087         8         9Scenario #2 - Supplier chosen for best pricing based on column "G"        10WINNERPART#VEN IDBRK1COST1BRK2COST2BRK3COST311 123ALL90110510107.512 123FO3511258107.7513WIN123RO501958.510814 123AR651858.7510815         16         17Scenario #3 - Supplier chosen for best pricing based on column "I"        18WINNERPART#VEN IDBRK1COST1BRK2COST2BRK3COST319WIN123ALL90110510107.520 123FO3511258107.7521 123RO501958.510822 123AR651858.75108Sheet1 [HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name boxPLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.

View 10 Replies


ADVERTISEMENT

Pick Up The Vendor Code Of Part Code From Looking Highest Quantity Of Part Code

Mar 9, 2013

I have an excel file having part code,name,vendor and Qty ( Quantity ).

My problem is that I want to apply an excel formula to pick up that vendor code who have highest Qty of a part code.The condition is that S.No.should not be disturbed.This file is so large,but here I have taken an example,

View 2 Replies View Related

VBA Code To Pick The Correct Sheets

Mar 31, 2009

I am having a problem with this script below. I think it is in the way the worksheet is picked. Can someone take a look and offer some advice on how to pick between the 2 sheets? I'm getting an error on this line in red below( object doesnt support this property or method)

View 14 Replies View Related

Pick Up Code Where It Left Off From Userform?

Oct 11, 2011

I have a VBA function that shows a user form. In the form, the user has to select a value from a combo box. Once they do that and click the submit button, I want to return to the next line in the function. So far I've been unable to accomplish this

View 1 Replies View Related

Find Word And Pick Up The Code?

Jan 18, 2014

I have codes (of three, four, or five digits) in Column A,names in column B, and names in column G.

The names in Column B and Column G are the same ones, but not in the same order, and they do not repeat exactly the same (e.g. I can have "Peter" in A10 and "Peter Jr." in A62, but not "Peter" and "Peter" again.

Each code belongs only to one name and never appears twice.

In K I want a formula that does the following:

K1: if the name in G1 is found anywhere in Column A, then bring the code that belongs to that name in G1.

(E.g.: If I have "Peter" in G1, and then "Peter" is found in B16 with the code "100" in A16, I want the code "100" of the A16, to come to K1).

View 2 Replies View Related

VBA Code Required To Pick Value In Upper Cell?

Feb 25, 2014

I want a macro fill the value which is on the upper cell.

eg:If A1= Code and A2 is blank, A2 should be filled with A1 value which is 'Code'.

In the attached, I want C3,C4,C5 to be filled with 'A' which is in C2,

likewise I want C7,C8 to be filled with 'B' which is in C6 and C11 to be filled with 'C' which is in C10, likewise the data has to be filled in entire C col.

View 5 Replies View Related

VLOOKUP And SUM Formulas: Pick Up Another Value In Column 9 And Should Add Value In Column 7 And 9 And Return It

Apr 6, 2007

=IF(ISNUMBER(VLOOKUP($E8,Su!$D:$K,7,FALSE)),VLOOKUP($E8,Su!$D:$K,7,FALSE),)*$I8

In the first vlookup it picks up a value. I need to do the same vlookup function but it should also pick up another value in column 9 and should add value in column 7 and 9 and return it. Employee id numbers are in column E in the first page.My formula checks for the employee id in Su sheet and retrieves the value from the seventh column. I need to retrieve also from 9 th column and add them together.

View 8 Replies View Related

How To Pick Name From Column Based Value Difference In Column B

Dec 12, 2013

I have data like this:

NameRank
pietro30
fabri35
mauri60
andrea45
luigi50
anna90
federica100
julia120

Now I want to pick names from column A with rank difference between name should equal to 30.

Expected result

NameRank
pietro30
mauri60
anna90
julia120

View 7 Replies View Related

Formula To Pick Last Value In A Column

Mar 23, 2009

Is there a formula or function that allows me to always select the lowest (not min) actual lowest in a column? For example, I have a formula in A1 and I need it part of it to always reference the bottom of a certain range (i.e. A5.A200).

So one day the lowest would be A7 but a week later it could be A8. I don't want to have to keep changing the formula in A1 to find the lowest value. I will be adding data on a regular basis.

View 6 Replies View Related

Pick Random Name From Column

Dec 24, 2007

I've got a list of names in a column in excel, what's the easiest formula to pick a random name from that list? (guess I can use f9 to randomize)

View 6 Replies View Related

Pick The Number Farthest Down In A Column

Mar 17, 2009

The attachment shows a ledger that I am trying to build. My goal is to automatically add the Ledger balance(G) at the end of each day to the Investment cash balance(J) column. Some days there are multiple Ledger transactions, other days there are none. If there were no Ledger transactions on that day I would like to use the last recorded Investment cash balance. (ex. on weekends there will be no transactions)

Note: I want exactly one balance, the ending daily balance, per day on the investment side of the worksheet.

I have struggled with this all afternoon. My goal is to make this as simplistic as possible for two reasons. 1) I am not a master programmer by any means. 2) I want this file to open on any computer the has a MSExcel on it without have to install any addins.

For these reasons I am thinking it would be best to stay away from macros, which I am minimally proficient at creating.

Let me know if you have any good tricks to solve my problem. If macros are the ONLY or absolutely the BEST way to do this, then I guess you can twist my arm an we can go down that avenue.

View 14 Replies View Related

Pick Up Line Items By The Value In One Column

Feb 12, 2014

As per attached file, there are altogether 4 sub-files and 1 master file.

I'll need the code to automatically pick up the top 9 revenue(highlighted in Green) and top 9 EBIT(highlighted in Yellow) by values in Column N from 4 sub-files and paste to the master file.

Attached File : Example file1.xlsx‎

View 9 Replies View Related

Pick Values From One Column And Organize In Another

Mar 31, 2009

I have a column of numbers and I want to copy numbers, with a constant periodicity, and paste in a new column. In the example below, I copy values from column A and past in column B, picking only every third value:

A B
1 1
2 4
3 7
4 10
5
6
7
8
9
10

View 7 Replies View Related

Pick Combobox Column To Display (ID Vs Name) Via VBA

Jul 2, 2013

I have some vba code that opens up notepad and populates it with data from Access 2010. Everything works great including the notepad function, the database, and how the data is stored and displayed in the table/form.

The problem: I want to display the service name not the ID in notepad

I passed the field that I want to include in notepad as a string. However, it returns the ID and not the name of the person.

I don't want to change anything in the form or field property because it works perfect as is.

Is there a way to pick which column to display in the Email by vba code?

Column 0 = the ID and Column 1 = the name

Code:
Me.fieldName.Column(1)
^^That doesn't work for me

Here's my code (it works)

Code:
Private Sub cmdNoteAccept_Click()
Dim strCode As String

strCode = strCode & Me.Servicer & ": "
strCode = strCode & Format(Me.DateCreated, "MM/DD/YYYY")

strCode = strCode & "Insert message here"

Shell "Notepad.exe", vbNormalFocus
SendKeys strCode, True
End Sub

View 3 Replies View Related

Pick Up A Specific Number From Column

Jun 9, 2007

I have two columns in excel. Column “A” where I have different group names column "B" all the different numbers and column “C” where I have ranked based on column “A”. I need a formula that would pick a number that is ranked 51 with specific group. Currently I’m using below formula (where MC1 represents one of the groups)that is working great unless there is no tie, however if there is a tie for rank 51 and let say two numbers are 22 and 22 the formula will return 44.

SUMPRODUCT(--(Terr!$Q$16:$Q$518=MC1),--(Terr!$AC$16:$AC$518=Main!C69+1),Terr!$Z$16:$Z$518)

View 4 Replies View Related

If Formula: Pick Out Which Is The Largest Figure Of Column A,B,C,D For Each Row

Oct 14, 2008

See attached. This is a report that I have to do every month. I cant work out a formula for it. What I need is a formula that will pick out which is the largest Figure of column A,B,C,D for each row and put the corresponding header in column G. i have manually put these in. Would anyone know a formula i could use for this.

View 3 Replies View Related

Putting Index Column - VLookup Does Not Pick Up Dates?

Apr 5, 2014

does it not like dates? i have columns of data and i wish to search it for each month and then print a months worth. here is part of the data. maybe vlookup does not like dates? i tried putting an index column on the left, 1,2,3,4... but it still would not pick up "Jun"

View 8 Replies View Related

Compare Multiple Rows And Pick Largest Value From A Column

Dec 10, 2013

See data in the attached image in Col A thru Col D. In Col E, I want to populate the max value for the same part # from Col C or Col D depending upon value in Col B.

I have included a sample of the expected results in Col E for illustration purposes.

For example Row 3,5,6 are all part # 1 with Col B ="Y", suggesting they are interchangeable parts, therefore, I would like the formula to have ability to pick 10 (since its largest between 3,10,0) from Col C.

Capture5.PNG

View 1 Replies View Related

Pick Data From A Specific Row/column (eg 10/B) Related To Active Cell

Dec 2, 2009

I have a spreadsheet with my Periods along row 10. e.g. C10: "1", D10: "2", E10 "3", F10: "4", G10: "5" etc. (green on the attached sheet). I have my departments along column B, e.g. B11: "Baked" B12: "Fresh" B13: "Frozen" (yellow on the attached sheet)

what I need and cannot work out is some VBA code that will populate two variables (lets call them Period & Department) when I click on one of the figures. For example if I click on cell: if I click E14: Period would have the contents of cell E10, and Department the contents of cell B14.

if i click G14: Period would have the contents of G10, and Department the contents of cell B14 again. I know how to get the click on the cell to work properly etc, and I have code to slot these variables into that works very nicely, I just can't get this bit to work!!!!

View 2 Replies View Related

Find Average Pricing For 16.5 Years?

Jul 31, 2014

Ive been given the data for bond pricing for two tenures i.e. 15 years and 20 years . I needed to find the average pricing for 16.5 years , whether excel is able to compute such pricing?

View 5 Replies View Related

Business Options/Pricing & Markup

Oct 12, 2009

When i open a new thread, so here i am doing so at the advice of him. The message below is specific to him to reply to but for anyone else that might want to help me with this set of formulas to resolve my worksheet headache and lack of skills in excel. Please feel free to have a look at the worksheet i posted and the comments in each color coded cell.

View 8 Replies View Related

Match Formula For Zone Pricing?

Dec 15, 2011

I have a zone matrix I'm working on. How can I have a formula match the state and return the numeric value assigned to the state?

Say I enter WA in cell "G5" and in column A I have the states and column B has the numeric value assigned. I need to to match and return the value.

So if "OR" is entered the returned value is "1"

StateZone
WA1
OR1
ID1

[Code]....

View 2 Replies View Related

Using Name Ranges To Group Customers Into Different Pricing Brackets

Aug 27, 2009

I have a worksheet that needs customers split into different price bands

here we go

I have 13 customers all from the same group (a)
1 customer in group (b)
1 Customer in group (c)
& 80 independant customers (d) worksheet only has 9 (1,2,3,4,5,6,7,8,9)

Column a is a list
D17 is the drop down list
D21 is the starting price

C2:D5 is the pricing multiple to be applied

What I am trying to achieve is when an independant company is chosen it defaults to d for pricing.

View 10 Replies View Related

VLOOKUP Pricing Sheet For Email Merge?

Apr 24, 2012

I have a spreadsheet of prices from vendors for products that my company sells that is updated daily. The sheet contains several products with pricing from multiple vendors and multiple locations. (Example: paper, pens and staples sold by Staples, Office Max and Office Depot, out of NY, NJ and CT.) Many of our customers use a set vendor for most days but occasionally call us to see if we can beat their regular vendor's price. We would like to be able to email them with our pricing every day so that we can have their business every time our pricing is best without them having to call us.

We have a sheet of customers with contact info and common products purchased put together already for a mail merge. At this point, we manually enter the best price from our vendors and a column calculates the price that would go to our customer based on markup and taxes, etc. and we send it out using the mail merge tool. However, our pricing sheet is not ready until about 8 am and the mail merge sheet is not ready until at least 10 am due to the large (and growing) number of customers on it. Many of our customers place their orders first thing the morning so we're losing business.

way to use VLOOKUP to draw from the pricing sheet as soon as it's finished and copied into Sheet2 of the mail merge sheet. The problem is that each customer has different parameters. We are in New England so we have vendors in several states. Ideally, we need to be able to provide a price for a RI customer based on the lowest price for their product out of one of our RI vendors and provide a price for an MA customer based on the lowest price for their product from any vendor in any NE state. The lowest price is different every day and the locations all have different prices. I'm also a VLOOKUP newbie so I don't know everything that it can do. Currently, I only use it to calculate shipping based on a pricing sheet that is always the same. I choose the product and all other data from the static price sheet comes over. I'm not sure how to create a sheet using VLOOKUP for a sheet that changes every day or one that requires more than one drop down. I'm not sure how to create the second drop down.

Also, at this point, the mail merge generates multiple emails for customers that purchase 2 or more products from us. Is there a way to include an array in a mail merge so that their email contains all products they use?

I'm not sure if it makes a difference, but each product is not sold out of each location and each vendor so the number of lines per product is different for each product. However, the number of lines per product is always the same day after day and if any vendors or locations are added or removed, we can tweak our merge accordingly. So basically the first 25 rows are always for product A and column A always reads Product A for rows 2-26; the columns that change are the vendor and location columns and of course the price column.

View 2 Replies View Related

Create Matrix Of Pricing By Conditions From Tables

Aug 21, 2008

i have many tables for many carriers with the same format, and i need to create a unified table of them, the tables look like this

-------A---------------------B-----------------------C---------
----Destination----------Country_Code-----------Price_Per_Minute
1------UK-------------------4479-------------------0.256-----
2------USA------------------1148------------------0.300------
3------Jordan----------------9626------------------0.899------
4------India------------------9198------------------0.345------

so let us consider that these are the prices for X company and i have another ten tables for other 10 companies, what i need to do is to create a unified table that includes all the companies prices for all the destination depending on the Country_Code as it could be considered as a primary Key and without any duplications and to include the all the data in all the tables as some destinations and prices are not available in all the tables, so the tables contains different data, the unified table should look something like this

-------A----------------B----------------C------------D---------E------
----Destination-------Country_Code-----X Price-----Y Price----Z Price----
1------UK-----------------4479-----------0.256-----0.254------0.356----
2------USA---------------1148------------0.300-----0.876------ ---
3------Jordan-------------9626-----------0.899------0.987------0.324---
4------India---------------9198-----------0.345----- -------0.564--

View 6 Replies View Related

Determine Cost For Stepped Pricing In Seconds

Apr 23, 2008

The phone call is charged at 0.57 for the first 60 seconds, thereafter 0.0095 per second. Determine cost if duration (in seconds) is available?

AND

The phone caal is charged at 1.654 for the first 60 seconds, thereafter 0.827 for every 30 seconds.Determine cost if duration (in seconds) is available?

View 7 Replies View Related

Pricing Model Formula Based On Units Produced

Nov 27, 2013

We are trying to work out a pricing model based on how many units we will produce. In production the price per unit will be really high when you produce a low quanity, and the price per unit will be lower with the more units you produce (but never reach zero). What we are trying to accomplish is to create a formula to build a pricing structure that accounts for this curve without having to price every possible scenario.

For example, if we have the following data where for 1 unit we charge $3 per unit to produce, for 5 units we charge $2 per units to produce, etc...:

1 units @ $3 per unit
5 units @ $2 per unit
10 units @ $1 per unit

What I need to figure out is how much it would cost per unit if we were to produce 3 units. I'm guessing it would be somewhere around the $2.40 mark give or take. Or say 8 units, would be something like $1.50 per unit.

Is there a formula that can calculate this? I've tried thinking of it as a moving average, or prorating the pricing.

View 2 Replies View Related

VLOOKUP Query (produce A Dropdown List Of These Items For Use Within The Pricing Sheet Worksheet )

Mar 27, 2009

I have attached a sample workbook, (Pricing Sheet - Major) within this work book there is a worksheet entitled Price Book which has commonly-used materials, unit prices and labour rates. What he wishes to do is use the contents of the Price Book worksheet within a worksheet called Pricing Sheet to enable him to prepare quotations.

I had the idea to first sort the items in the Price Book worksheet and then produce a dropdown list of these items for use within the Pricing Sheet worksheet and used the VLOOKUP function to obtain the values for unit prices and labour within the Price Book and use them in the Pricing Sheet worksheet.

View 5 Replies View Related

Formula To Have Spreadsheet 2 Pick Items From Pass / Fail Column On Spreadsheet 1

Jan 23, 2012

Workbook 1 has 2 spreadsheets. Spreadsheet 1 contains Item and Pass/Fail Columns. under the item column is the serial number of the item tested. the Pass/fail column has the serial number duplicated if it failed tested. what is the formula is to have spreadsheet 2 pick the items from the pass/fail column on spreadsheet 1?

View 4 Replies View Related

Code To Delete Rows Based On Status Code In Column

Jul 24, 2009

I'm trying to write a VBA script which will delete all rows in my Excel spreadsheet where Column I (which contains a status code) does not contain the word "Completed".

At the moment, I'm doing this the other way round: my script is able to search for entries in Column I which contain the status codes "Pending", "Awaiting Authorisation", "In Progress" etc and delete them. The idea is that when all those rows are deleted, I'll only be left with rows which have a status of "Completed". This works fine at the moment. However, the concern is that if a brand new status code is added to the data file, my script would be unable to pick it up and delete it. This is a small sample of the code I'm currently using (which deletes all the rows with statuses other than Completed):

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved