+ Reply to Thread
Results 1 to 16 of 16

IF field is full use, otherwise use...

  1. #1
    Registered User
    Join Date
    04-21-2007
    Posts
    12

    IF field is full use, otherwise use...

    Hi all,

    I'm so new in excel scripting and i need simple help.

    I've got a sheet with the following info.

    Price - Bulk Price - Total price

    And i need to calculate the total price (totalprice = (PRICE OR bulkPRICE * 2.5)

    If Bulkprice contains a number i need to use that field but if it's empty i need to use Price.

    How can i do this?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try this

    =IF(B2,B2*2.5,A2*2.5)
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day Eric,

    Price=A20, Bulk Price=B20, Total Price=C20

    Try this,


    Please Login or Register  to view this content.

    HTH
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  4. #4
    Registered User
    Join Date
    04-21-2007
    Posts
    12
    It didn't work it gave an error on the first argument

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Does your version of XL support commas in formulas or semi-colons?

  6. #6
    Registered User
    Join Date
    04-21-2007
    Posts
    12
    How can i find out if it can? i use office 2003! (dutch)

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    I thought as much ,seeing your name

    Just replace the , with ; in the formula.That should do I think

  8. #8
    Registered User
    Join Date
    04-21-2007
    Posts
    12
    Tobad that didn't work? can someone create a sample sheet for me? so i can test? :D

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by EricBruggema View Post
    Tobad that didn't work? can someone create a sample sheet for me? so i can test? :D
    What error are you getting?

    Why don't you create a sheet so we can see your layout and your expected results.

  10. #10
    Registered User
    Join Date
    04-21-2007
    Posts
    12
    Here is an example.

    You see in the sheet what i need to know
    Attached Files Attached Files

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    The formula placed in Column D works fine for me.

    =IF(C2,C2*2.5,B2*2.5)

    I can't check arthurbr's comments on the Dutch version, but I am sure that is correct.

  12. #12
    Registered User
    Join Date
    04-21-2007
    Posts
    12
    Hi and thanx!

    This is the fix

    =ALS(C2;C2*2,5;B2*2,5)

  13. #13
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Darn, didn't think of the translation ...

  14. #14
    Registered User
    Join Date
    04-21-2007
    Posts
    12
    Another question,

    Is it possible to to only the math when the value is bigger then 0?

  15. #15
    Registered User
    Join Date
    04-21-2007
    Posts
    12
    Anyone please? :D

  16. #16
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day Eric,

    Try this,

    =ALS(C2=0;"";ALS(C2;C2*2,5;B2*2,5))

+ 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. Store Bitmap Object In Excel 2003 To Access Database?
    By Soar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2008, 02:13 AM
  2. Format a field based on another field
    By golfduke in forum Excel General
    Replies: 3
    Last Post: 02-22-2008, 09:36 PM
  3. How to Update the Worksheets field value based on updates done in Main Worksheet.
    By arunsinghpundir in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-10-2007, 07:44 AM
  4. Pivot table field question
    By jjjjj55555 in forum Excel General
    Replies: 2
    Last Post: 02-22-2007, 09:09 AM
  5. Leading zeroes in a text field
    By MarlaJ in forum Excel General
    Replies: 8
    Last Post: 02-12-2007, 06:33 PM

Tags for this Thread

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