简体   繁体   中英

I am learning and trying to use multiple IFS with AND, OR, NOT function in excel, but it was returning #VALUE

This is the formula that I made:

=IF(AND(ISNUMBER(SEARCH("Tip Top";E4));ISNUMBER(SEARCH("Hari Hari";E4));F4>25);10000*F4;5000*F4);IF(AND(NOT(ISNUMBER(SEARCH("Tip Top";E4)));NOT(ISNUMBER(SEARCH("Hari Hari";E4)));F4>25);15000*(F4/6);(F4/6)*5000)

I have tried to modify the formula, but it gives error:

'You've entered too many arguments for this function'

I am trying to return this:

-Daily Incentive for SPG's in Tip Top & Hari Hari: 10.000 IDR/sachet in case sales > 25 sachets, 5.000 IDR/sachet in case sales < 25 sachets.

-Daily Incentive for SPG's in all other stores: 15.000 IDR for every 6 sachets sold in case sales > 25 sachets, 5.000 IDR for every 6 sachet solds in case sales < 25 sachets.

Can anyone tell me where I did wrong? The error value and the needs to really solve this problem always linger in my mind. I think I can't sleep peacefully if I hadn't found where I did wrong. Thank you so much, your guidance is much appreciated!

whats going on at 10000F4;5000F4? missing < or > or =

Writing long equations in excel if difficult to trouble shoot. I recommend copy pieces of the formula and place them into other cells and see if it returns what you expect.

For instance I would copy a segment like below and put an "=" in another cell and paste:

=NOT(ISNUMBER(SEARCH("Hari Hari";E4)))

repeat the process until you find the error.

Other methods to resolve this is to use ifs(), switch(), or stop using excel functions and use power query for excel or other tools.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM