+ Reply to Thread
Results 1 to 3 of 3

Can someone fix this if formula

  1. #1
    Registered User
    Join Date
    09-06-2008
    Location
    London
    Posts
    4

    Can someone fix this if formula

    =IF(A2>D2,(B10-0.5)*Y2+A2,B10-1*Y2+D2)



    If A2 is selected I want to subtract .5 from B10 and multiply the result by Y2 and add A2

    If D2 is selected I want to subtract 1 from B10 and multiply the result by Y2 and add D2


    I was trying to do the formula as A2 being greater than D2 because that was the only way I could think of getting it to switch from one to the other once one had been selected but the selection is manual so I'd rather not keep that if possible.


    As you've probably guessed I am a novice

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Does this work for you?

    =IF(A2<>"",((B10-0.5)*Y2)+A2,IF(D2<>"",((B10-1)*Y2)+D2,""))
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Can someone fix this if formula

    If you want the selection to be the event then Worksheet_SelectionChange migth be the trigger:
    Please Login or Register  to view this content.

+ 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. Formula for bond price
    By Dracan in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-15-2014, 11:17 AM
  2. A formula template
    By ajaysehgal in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2013, 06:12 AM
  3. Reset Formula without Editing Formula?
    By Ogey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2007, 08:44 PM
  4. Conditional formula question
    By odditie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2007, 09:47 PM
  5. use cell content as cell address in formula
    By nnsc in forum Excel General
    Replies: 4
    Last Post: 11-05-2006, 03:12 AM

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