+ Reply to Thread
Results 1 to 5 of 5

Calculating a value and posting total to 1 of 4 fields dependant on the content of another

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    Leeds, West Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    14

    Post Calculating a value and posting total to 1 of 4 fields dependant on the content of another

    Hi, bit of a newbie to Excel ( 2010 ) I can find my way around a bit and generally seek answers to problems using Google but I wouldnt know how to word this so would appreciate any help you knowledgeable people could provide.

    I am creating a Sales Leads spreadsheet. Within the spreadsheet I have a the following relevant fields.

    proposed sales value field ( F2 ), Estimated Close - which will be Q1,Q2,Q3 or Q4 ( G2 ), % Probability ( H2 ) & Q1 ( I2 ), Q2 ( J2 ), Q3 ( K2 ) & Q4 ( L2 ).

    F2 = 150
    G2 = Q2
    H2 = 10%

    I want to calculate the actual value of sales based on %prob and put the total into the correct field ( I,J,K or L ) based on what field G2 says. So in this case 15 into field J2. Any ideas please. I have attached an example which hopefully makes sense of what I have wrote. Thank you.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Calculating a value and posting total to 1 of 4 fields dependant on the content of ano

    put:
    =IF($G2=LEFT(I1,2),$F2*$H2,"")
    in I2 and copy across to L2.

  3. #3
    Registered User
    Join Date
    01-08-2014
    Location
    Leeds, West Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating a value and posting total to 1 of 4 fields dependant on the content of ano

    Thank you yudlugar that worked a treat, no idea how the formula works but that has saved me a lot of time. Cheers

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Calculating a value and posting total to 1 of 4 fields dependant on the content of ano

    Hi, it is worth using the formula evaluating tool to step through a formula so you understand it but to briefly describe:
    LEFT(A,n)

    takes the first n letters of the text A.

    So Left(I1,2) returns the first 2 letters of I1, which is Q1.

    =IF(a=b,c,d)
    states that if a is equal to b, return c, otherwise return d.

    So:
    =IF($G2=LEFT(I1,2),$F2*$H2,"")
    states that if G2 equals the first 2 letters of I2, then return F2 * H2, else return "".

    then when it is copied across the I1 become J1 and so on.

  5. #5
    Registered User
    Join Date
    01-08-2014
    Location
    Leeds, West Yorkshire
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating a value and posting total to 1 of 4 fields dependant on the content of ano

    ah I see, fairly straight forward when explained so clearly. I really appreciate your help. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Template used dependant on data content
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-03-2013, 06:58 AM
  2. VBA code for calculating total price without clearing the content
    By technocrawl in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-08-2011, 02:33 AM
  3. How to Disable automatic fields in pivot table like total and count on fields
    By anushka in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2009, 07:53 AM
  4. [SOLVED] Calculated Fields Based on Running Total Fields?
    By Kruncher in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2006, 01:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1