How do I give a letter a value and use that letter as a code througout a spredsheet?

Hi I am trying to write a spread sheet to calculate the cost of repairing stock items. I cant figure out how to make the code = the cost, so that if somone types Hx3+Tx2+rx1 it would  = £8
Which would mean: 3 x Hooks need replacing 2 x Tabs need replacing and 1 5cm rip needs repairing.
SO I have made one table with the codes and the values and one table for the items and their various panels that may need repairing but I cant figure out how to make it work...?
Can any of you help...?

HI Mich,
Here's an idea of the complexity of the issue, using the example in line 41:
Issue 1: determining what is code, what is quantity, and how many items are in each cell.
In the first cell, the formula has to determine, from the text string "Rx1 rx3" that:
There are two items. Possible to do this by counting the spaces and adding 1, or, assuming ALL parts in the cell will contain a x sign, by counting the "x" characters..
The first letter is code. But the code could also be the first two letters, or the first two letters plus a number (eg. WP5) or the first two letters plus the next two characters (eg. WP11). Other code lengths may also be possible. The length of the (first) could be determined using SEARCH to find the first x. Subtract 1 from that to determine the number of characters in the code, then use LEFT to extract the code from the formula.
=LEFT(B2,SEARCH("x",B2,)-1)
Now that the code has been extracted, that formula becomes the first argument of the VLOOKUP formula from the previous post, used to find the price of that item:
VLOOKUP(LEFT(B2,SEARCH("x",B2,)-1),Price List :: B:C,2,FALSE)
Next, the price must be multiplied by the number following the x. That number must be extracted. Assumption: The number is a single digit, between 1 and 9, inclusive. We can use MID:
MID(B2,SEARCH("x",B2,)+1,1)
=VLOOKUP(LEFT(B2,SEARCH("x",B2,)-1),Price List :: B:C,2,FALSE)*MID(B2,SEARCH("x",B2,)+1,1)
The result above gives the cost for repairing the large rip in B2
Next, if there is more than one type of repair to be done, the process above must be repeated with a new twist: This time we're looking for the second repair item in B2. The marker is a space, so we'll need to add a SEARCH for the first space, and use that as the starting point for both SEARCH functions in this section.
Then the whole process (with another SEARCH added to each set) must be repeated for the third (possible) code and number in the cell.
Repeat 7 for as many items as could be included in this cell.
We don't know how many items will be recorded in each cell, so we have to allow for a maximum and provide some means of making the formula quit when there's nothing more to be done. This could be an IF, depending on the count of "x" or " " in the cell, or an IFERROR that would trap the error caused by searching beyond the last space. Whatever we used would need to be added to each iteration of the last formula shown above.
As you can see, this quickly becomes a bit unwieldy, and a reason for my earlier suggestion to set up pairs of columns for each repair item.
Regards,
Barry

Similar Messages

  • Querying on a value and using that to pull other data in the same query

    I am having some issues pulling the correct data in a query. There is a table that houses application decision data that has a certain decision code in it, WA, for a particular population of applicants. These applicants also may have other records in the same table with different decision codes. Some applicants do NOT have WA as a decision code at all. What I need to do is pull anyone whose maximum sequence number in the table is associated with the WA decision code, then list all other decision codes that are also associated with the same applicant. These do not necessarily need pivoted, so long as I can pull all the records for a person whose highest sequence number is associated with WA and all of the other decision codes for that applicant for the same term code and application number also appear as rows in the output.
    I do not have the rights in Oracle to create tables, so please pardon if this code to make the table is incorrect or doesn't show up here as code. This is not the entire SARAPPD table framework, just the pertinent columns, along with some data to put in them.
    DROP TABLE SARAPPD;
    CREATE TABLE SARAPPD
    (PIDM              NUMBER(8),
    TERM_CODE_ENTRY   VARCHAR2(6 CHAR),
    APDC_CODE         VARCHAR2(2 CHAR),
    APPL_NO        NUMBER(2),
    SEQ_NO             NUMBER(2));
    INSERT INTO SARAPPD VALUES (12345,'201280','WA',1,4);
    INSERT INTO SARAPPD VALUES (12345,'201280','RE',1,3);
    INSERT INTO SARAPPD VALUES (12345,'201280','AC',1,2);
    INSERT INTO SARAPPD VALUES (23456,'201280','RE',1,2);
    INSERT INTO SARAPPD VALUES (23456,'201280','WA',1,3);
    INSERT INTO SARAPPD VALUES (23456,'201280','SC',1,1);
    INSERT INTO SARAPPD VALUES (34567,'201280','AC',1,1);
    INSERT INTO SARAPPD VALUES (45678,'201210','AC',2,1);
    INSERT INTO SARAPPD VALUES (45678,'201280','AC',1,2);
    INSERT INTO SARAPPD VALUES (45678,'201280','WA',1,3);
    INSERT INTO SARAPPD VALUES (56789,'201210','SC',1,2);
    INSERT INTO SARAPPD VALUES (56789,'201210','WA',1,3);
    COMMIT;I have attempted to get the data with a query similar to the following:
    WITH CURR_ADMIT AS
          SELECT   C.SEQ_NO "CURR_ADMIT_SEQ_NO",
                            C.PIDM "CURR_ADMIT_PIDM",
                            C.TERM_CODE_ENTRY "CURR_ADMIT_TERM",
                            C.APDC_CODE "CURR_ADMIT_APDC",
                            C.APPL_NO "CURR_ADMIT_APPNO"
                              FROM SARAPPD C
                              WHERE C.TERM_CODE_ENTRY IN ('201210','201280')
                              AND C.APDC_CODE='WA'
                             AND C.SEQ_NO=(select MAX(d.seq_no)
                                                   FROM   sarappd d
                                                   WHERE   d.pidm = C.pidm
                                                   AND d.term_code_entry = C._term_code_entry)
    select sarappd.pidm,
           sarappd.term_code_entry,
           sarappd.apdc_code,
           curr_admit.CURR_ADMIT_SEQ_NO,
           sarappd.appl_no,
           sarappd.seq_no
    from sarappd,curr_admit
    WHERE sarappd.pidm=curr_admit.PIDM
    and sarappd.term_code_entry=curr_admit.TERM_CODE_ENTRY
    AND sarappd.appl_no=curr_admit.APPL_NOIt pulls the people who have WA decision codes, but does not include any other records if there are other decision codes. I have gone into the user front end of the database and verified the information. What is in the output is correct, but it doesn't have other decision codes for that person for the same term and application number.
    Thanks in advance for any assistance that you might be able to provide. I am doing the best I can to describe what I need.
    Michelle Craig
    Data Coordinator
    Admissions Operations and Transfer Systems
    Kent State University

    Hi, Michelle,
    903509 wrote:
    I do not have the rights in Oracle to create tables, so please pardon if this code to make the table is incorrect or doesn't show up here as code. This is not the entire SARAPPD table framework, just the pertinent columns, along with some data to put in them. You really ought to get the necessary privileges, in a schema that doesn't have the power to do much harm, in a development database. If you're expected to develop code, you need to be able to fabricate test data.
    Until you get those privileges, you can post sample data in the form of a WITH clause, like this:
    WITH     sarappd    AS
         SELECT 12345 AS pidm, '201280' AS term_code_entry, 'WA' AS apdc_code , 1 AS appl_no, 4 AS seq_no     FROM dual UNION ALL
         SELECT 12345,           '201280',                    'RE',               1,             3                 FROM dual UNION ALL
         SELECT 12345,           '201280',                  'AC',            1,          2               FROM dual UNION ALL
    ... I have attempted to get the data with a query similar to the following:
    WITH CURR_ADMIT AS
          SELECT   C.SEQ_NO "CURR_ADMIT_SEQ_NO",
    C.PIDM "CURR_ADMIT_PIDM",
    C.TERM_CODE_ENTRY "CURR_ADMIT_TERM",
    C.APDC_CODE "CURR_ADMIT_APDC",
    C.APPL_NO "CURR_ADMIT_APPNO"
    FROM SARAPPD C
    WHERE C.TERM_CODE_ENTRY IN ('201210','201280')
    AND C.APDC_CODE='WA'
    AND C.SEQ_NO=(select MAX(d.seq_no)
    FROM   sarappd d
    WHERE   d.pidm = C.pidm
    AND d.term_code_entry = C._term_code_entry)
    Are you sure this is what you're actually running? There are errors. such as referencing a column called termcode_entry (starting with an underscore) at the end of the fragment above. Make sure what you post is accurate.
    Here's one way to do what you requested
    WITH     got_last_values  AS
         SELECT  sarappd.*     -- or list all the columns you want
         ,     FIRST_VALUE (seq_no)    OVER ( PARTITION BY  pidm
                                        ORDER BY      seq_no     DESC
                                  )           AS last_seq_no
         ,     FIRST_VALUE (apdc_code) OVER ( PARTITION BY  pidm
                                        ORDER BY      seq_no     DESC
                                  )           AS last_apdc_code
         FROM    sarappd
         WHERE     term_code_entry     IN ( '201210'
                           , '201280'
    SELECT     pidm
    ,     term_code_entry
    ,     apdc_code
    ,     last_seq_no
    ,     appl_no
    ,     seq_no
    FROM     got_last_values
    WHERE     last_apdc_code     = 'WA'
    ;Don't forget to post the results you want from the sample data given.
    This is the output I get from the sample data you posted:
    `     PIDM TERM_C AP LAST_SEQ_NO    APPL_NO     SEQ_NO
         23456 201280 WA           3          1          3
         23456 201280 RE           3          1          2
         23456 201280 SC           3          1          1
         45678 201280 WA           3          1          3
         45678 201280 AC           3          1          2
         45678 201210 AC           3          2          1
         56789 201210 WA           3          1          3
         56789 201210 SC           3          1          2I assume that the combination (pidm, seq_no) is unique.
    There's an analytic LAST_VALUE function as well as FIRST_VALUE. It's simpler (if less intuitive) to use FIRST_VALUE in this problem because of the default windowing in analytic functions that have an ORDER BY clause.

  • HT1689 How to see my credits in iPad iTunes and use that to buy tv series?

    Common guys

    1. Is it a smart TV?
    2. If so.... Is the TV connected to the Internet?
    3. If it is.... Check if your iPod and your TV share the same IP address (Wi-Fi network)
    4. If they do.... Then you should go to wherever your "Other Media" tab is.
    5. After that.... Search for you iPod. Because it is connected to the same network, it should recognize the device they same way AirPrint does.
    6. If you happen to see this fail, then try this method:
    1. Do you have a Bluetooth-enabled computer/laptop?
    2. If so.... Enable the bluetooth on the computer/laptop as well as your iPod.
    3. After that.... Your iPod should be actively searching and it should find the computer/laptop.
    4. If it did.... Transfer the file onto Windows/Mac (preferably Mac) and find the program to open the file.
    5. After doing so.... Connect your computer/laptop to the TV via HDMI Output Cable.
    6. Now it should work!

  • Hi! can any1 pls let me know how to create a look up table in labview and use that in the vi.

    hello !
    i have no idea how to build a lookup table(as v use in microcontroller) in labview and use that in vi.pls help me
    txs
    nitin
    Solved!
    Go to Solution.

    If the lookup table is always going to remain the same (e.g. a character generator or something similar) you can place the values in a 2D array constant on your diagram, with the input value as one column, the equivalent as the other. When you need to perform the lookup you use an index array to return all the values in the "input column", search it using "search 1D array" and use the resulting index number to index the other column's data. If the values may change, then it would probably be best to load an array control with your equivalent values from a file.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How to create a matrix with constant values and multiply it with the output of adc

    How to create a matrix with constant values and multiply it with the output of adc 

    nitinkajay wrote:
    How to create a matrix with constant values and multiply it with the output of adc 
    Place array constant on diagram, drag a double to it, r-click "add dimension". There, a constant 2D double array, a matrix.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • I had bought iphone 4 from singapore and now i am relocated to india.....there is some hardware problem in the phone due to which i m nt able to use it.....how do i give the phone for repair and in which country?

    i had bought iphone 4 from singapore and now i am relocated to india.....there is some hardware problem in the phone due to which i m nt able to use it.....how do i give the phone for repair and in which country?

    The warranty is not international and only available in the Country of purchase .If the iPhone is out of warranty  Apple or their Agents will also only give service in the country of original purchase.
    So if you want Apple help you will have to return it to Singapore or find a 3rd party to repair it if they can in India  as long as it is out of warranty and you understand that Apple would never help with that device in future if it has been opened by a 3rd party

  • HT2509 How can I change a font recognition, whenever I use 'Palbo Let' it defaults to 'Lucinda Grande'?

    How can I change a font recognition, whenever I use 'Palbo Let' it defaults to 'Lucinda Grande'?

    I have a copy of what I did if that's what you mean.  And it's funny because it happened again.  I was just randomly messaging someone and a picture popped up with the Aa key and the color slide on the right edge .  Normally if I hit the pictures my pictures come up small on the bottom of Messenger and then I can send them or do other things.  But when it happened yesterday  I don't know if I hit a combination of keys or how I did it but I did but a large picture came up that I took of Facebook (both times were pics of f/b) and instead of the normal Airdrop, then Facebook, Messenger, Mail, Twitter and the More button  and under that the copy, slideshow, print, etc.  I get the Aa and the color thing.  Can someone be hacking me.  Can it be an error.

  • How can I move my old iPhoto library into a Referenced Library format and use that as my default?

    Hi, I have been using iPhoto for photo management where all the jpegs have been living, in organized events by date and subject for some time. I recently upgraded to aperture and am using the same iPhoto library. The issue I have is that I use Carbonite for my cloud back up and I am able to look at the pictures I have on my PC with the same folder organization I have them on my PC hard drive. This is apparently not possible for iPhoto library. The only way to access a picture on the iPhoto library in the cloud is to go through the master and hope you can find the specific picture since they are not organized in a comprehensible manner (like events or folders) in there.
    So the only solution I can think of is to move the current iPhoto library to a referenced image library and use that as my default library from now on. This way I get cloud access and the events will hopefully turn into folders with dates and subjects that I can continue to keep organized to satisfy my OCD tendencies.
    So the question I have is that:
    1. How can I make a reference Library for Aperture/iPhoto?
    2. How do I move the current library to the Referenced Library in an Organized manner? My wish list would be a series of folders labeled with the date and the subject, like I have in my iPhoto library right now.
    3. If there is any alternative, your suggestions and recommendations would be much appreciated.
    My computer: Mac Mini (Mid 2012), Lion, 16GB RAM.
    Thank you kindly,

    Or is there a way to go through aperture to make a new reference library that I can move the masters into later?
    you do not move the masters into a references library - you turn your current library into a referenced library.  As Terence Devlin said:
    File -> Relocate Masters
    What you should set up:
    Select a folder, where you want to store your referenced files - probably on an external drive.
    Decide on a hierarchical folder structure inside this folder - that is completely up to you.
    Select a project from your library and use the command "File -> Relocate Masters/Originals" to move the original image files to the folder where you want to go them to. Only take care not to send two projects to the same folder.
    Alternatively, if you do not care about the folder structure Aperture will use, select all images at once from the "Photos" view and let Aperture decide how to assing the folders - in the "Relocate Originals" dialoge you can specify a subfolder format.
    Regards
    Léonie

  • I deleted all downloaded songs from my iphone but under Settings/About it still shows songs on my phone. How do I fix this?  I need to use that storage space for other things.

    I deleted all downloaded songs from my iPhone but under
    Settings/About it still shows songs on my phone.
    How do I fix this?  I need to use that storage space for other things.

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • How do you install windows XP on macbook and use microsoft access

    how do you install windows XP on macbook and use microsoft access?

    there are two methods to intall windows on your macbook
    1st is through Parellel software
    2nd is through Boot camp.

  • HT1711 How do I delete music from my Iphone and iTunes that is duplicated ?

    How do I delete music from my Iphone and iTunes that wais duplicated, All songs shows up twice?

    See Here...
    iPhone User Guide
    and here
    http://www.apple.com/support/iphone/syncing/

  • How to automate the execution of several programs and use their output

    Dear java members,
    I am trying to figure out how to get data from a file, database, or program and use that information in another program. Can you help please?
    I have looked through several texts and while the information is there somewhere I have not found the specific capabilities or examples that explain how to do this.
    I want to learn how to do this with objects.
    The specific applications I am working with are the GIS (Geographic Information System) suite of ESRI products such as ArcInfo and ArcView.
    I am working with simulators for hydrologeology (ground water) and other geophysical phenomenae. Programs for decisions and assessment of probability such as found in geostatistical analyses packages. Drawing programs and data manipulation programs such as spreadsheets in windows and scripting languages found in most Unix packages.
    I want to be proprietary platform free! I want to be accessing apps and or data wherever they are and in whichever form they are in or best used.
    Web techniques and protocols are where I think most of my effort will be focused.
    One of the mediums (media) that I expect to use a lot is XML.
    If I can find a simplified (generalized) explanation how this is done and how the parts fit together through and or with objects. If I can find references to texts and examples I will be very appreciative and very much less confused.
    I am interested in using the Java programming language.
    Thank you
    ctavares1

    Hello Tavares,
    What you seek can be done, but before that you must know from where you want to take the data. In what form you will get the data in and where you want to use it and how.
    Your problem is what we call an architectural issue. If possible please write to me at [email protected]
    With the above information - I shall be able to help you to some extent.
    Ironluca

  • I can not get any updates and therefor not use Java as it only run updates for Mac 10.7. and later? How do i get the updates to install and use Java?

    I can not get ny updates and therefore not use Java, as it only run updates for MAC 10.7. and later. How do i get the updates to install and use JAVA ?

    In Snow Leopard you update Java from Software Update (in the Apple menu). You can check your version by opening Terminal and typing
    java -version
    (don't get creative and type anything else)
    The latest version is 1.6.0_65.

  • How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

    I created a virtual machine on vmware workstation 6 and installed OEL4.
    during first install I created 20 GB disk but now I want to add more disks.
    from vmware documentation I tried to add more 8 gb disk to the virtual host.
    under devices I see two lines;
    Hard Disk (SCSI 0:0) 20.0 GB
    Hard Disk (SCSI 0:2) 8.0 GB
    but I must be missing some step since I can not see 20 + 8 gb at df;
    [root@antuhost ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1              13G  9.7G  2.3G  82% /
    none                  506M     0  506M   0% /dev/shm
    /dev/sda2             4.9G  851M  3.8G  19% /homeThank you.

    Oh the check the answer from Re: How to add additional disks on vmware OEL4 and use it for Oracle 10gR2?

  • I had installed Adobe CS5 Master Collection on my PC about a year ago, the PC is now dead and i purchased a mac.  i just wanted to know if i can download the Mac version and use that cereal number to activate the it?  and if yes how and where do i go?  wo

    i had installed Adobe CS5 Master Collection on my PC about a year ago, the PC is now dead and i purchased a mac. 
    i just wanted to know if i can download the Mac version and use that cereal number to activate it?  and if yes how and where do i go?  would appreciate anyones help.  Cheers Ron

    i just wanted to know if i can download the Mac version and use that cereal number to activate it?
    No.
    Serial numbers are Mac only or Windows only. There is a platform swap process (from Mac to PC etc) but only for CS6.
    As a CS5 owner, your choices are to either pay to upgrade to CS6 for Mac or join the Cloud.

Maybe you are looking for

  • How can i have 2 iphone on 1 cloud

    2 iphone 1 cloud  i lost my contacts

  • Plain Old Favorites - Global installation - Why not supported?

    Using Windows XP. Since you have adopted your "aggressive release cycle" approach, with every upgade to FireFox, you have broken compatibility with the "Plain Old Favorites" extension. In the Version 3 releases, all I had to do was add the contents o

  • Flat IDoc to Retail backend system

    Hello, I have a flat file, representing ORDERS01 IDoc transaction. Part of the file is listed below as an example. On the back-end I have a SAP Retail Management System, that should consume this purchase order and do something with it. Question: how

  • Configuration setting for Message type to take OA print out put

    Hi All, Please let us know how to configure setting for Message type  for OA in SD to take print or to get print preview. Pls let me know . Regards, Nagaraj S

  • Syncing ipod touch problem

    Got a new laptop as my old one is broke, when I set up a new itunes on my new laptop the itunes library will only pick up some of the songs and I do not have a back up for the rest of them. If I press sync then it says it will erase everything on my