# If Function problem for newbie

1. ## If Function problem for newbie

I need to return a value of 10% or 20% depending on the value of a date in another cell to determine a deposit value depending if the date is is in Winter or Summer.

For example the deposit will be 10% if a date falls in Winter determined by the MM value in an adjoinig date field cell.

Therefore if the MM value from (DD-MM-YY) is 11-12-01-02-03 the deposit cell will reflect 10% and any other MM value will reflect 20% for Summer.

Appreciate any help on this as this is way above my knowledge of functions/formulas.

2. ## Re: If Function problem for newbie

Can u plz post a sample file

3. ## Re: If Function problem for newbie

Hi

Assuming that you have a date in A1 and a number in E1, then try this formula in another cell.

=IF(OR(MONTH(A1)=11,MONTH(A1)=12,MONTH(A1)=1,MONTH(A1)=2,MONTH(A1)=3),E1*10%;E1*20%)

5. ## Re: If Function problem for newbie

=IF(OR(MONTH(B4)>10;MONTH(B4)<4);0,1;0,2)
With a celformaat from 'percentage'

6. ## Re: If Function problem for newbie

AS PER YOUR ATTACHMENT TRY THIS

Formula:
`Please Login or Register  to view this content.`

Format cell to Percentage

7. ## Re: If Function problem for newbie

Sorry the correct formula is

Formula:
`Please Login or Register  to view this content.`

8. ## Re: If Function problem for newbie

Originally Posted by popipipo
=IF(OR(MONTH(B4)>10;MONTH(B4)<4);0,1;0,2)
With a celformaat from 'percentage'
That's what I came up with. But it needs an extra 'OR', right?

=IF(OR(MONTH(B4)>10)*OR(MONTH(B4)<4);0,1;0,2)

9. ## Re: If Function problem for newbie

Originally Posted by Alexej
That's what I came up with. But it needs an extra 'OR', right?

=IF(OR(MONTH(B4)>10)*OR(MONTH(B4)<4);0,1;0,2)
No. popipipo's formula works great.

10. ## Re: If Function problem for newbie

I am still getting an error when using the following

=IF(OR(MONTH(B4)>10;MONTH(B4)<4);0,1;0,2)

Not sure why to be honest

11. ## Re: If Function problem for newbie

Originally Posted by gico1972
I am still getting an error when using the following

=IF(OR(MONTH(B4)>10;MONTH(B4)<4);0,1;0,2)

Not sure why to be honest
Same here, that's why I thought it needed the extra OR...

12. ## Re: If Function problem for newbie

Originally Posted by Alexej
Same here, that's why I thought it needed the extra OR...
Originally Posted by popipipo
=IF(OR(MONTH(B4)>10;MONTH(B4)<4);0,1;0,2)
With a celformaat from 'percentage'
Try
Formula:
`Please Login or Register  to view this content.`

13. ## Re: If Function problem for newbie

Hi

..I am still getting an error when using the following

=IF(OR(MONTH(B4)>10;MONTH(B4)<4);0,1;0,2)

Not sure why to be honest
Take a look to the example pls.

14. ## Re: If Function problem for newbie

Perfect!! Now that works. Thanks

15. ## Re: If Function problem for newbie

Originally Posted by Fotis1991
Hi

Take a look to the example pls.

Edit: And for better understanding of all of you,popipipo in Holland(as i in Greece) use semi colns as separators(according to our local settings) and not comma. So if you change all semi colons to comma, fornula works fine.

16. ## Re: If Function problem for newbie

Originally Posted by gico1972
Perfect!! Now that works. Thanks

You are welcome(from all of us) and thanks for the feed back.

As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thank you.

Also, as an old member(but with few posts) of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

17. ## Re: If Function problem for newbie

popipipo in Holland(as i in Greece) use semi colns as separators
I usually change it.
Unfortunately I forgot this time

##### Users Browsing this Thread

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

#### Posting Permissions

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

## X vBulletin 4.1.8 Debug Information

• Page Generation 0.08511 seconds
• Memory Usage 9,360KB
• Queries Executed 16 (?)
Template Usage (35):
• (9)bbcode_quote
• (1)footer
• (1)forumrules
• (1)gobutton
• (17)memberaction_dropdown
• (1)navbar
• (4)navbar_noticebit
• (6)option
• (2)postbit_attachment
• (17)postbit_legacy
• (17)postbit_onlinestatus
• (17)postbit_wrapper
• (1)spacer_close
• (1)spacer_open
• (1)tagbit_wrapper

Phrase Groups Available (6):
• global
• inlinemod
• postbit
• posting
• reputationlevel
Included Files (39):
• ./vbseo.php
• ./env.php
• ./vbseo/includes/functions_vbseo.php
• ./vbseo/includes/functions_vbseo_pre.php
• ./vbseo/includes/functions_vbseo_url.php
• ./vbseo/includes/functions_vbseo_createurl.php
• ./vbseo/includes/functions_vbseo_db.php
• ./vbseo/includes/functions_vbseo_vb.php
• ./vbseo/includes/functions_vbseo_seo.php
• ./vbseo/includes/functions_vbseo_misc.php
• ./vbseo/includes/functions_vbseo_crr.php
• ./vbseo/includes/functions_vbseo_cache.php
• ./vbseo/includes/functions_vbseo_hook.php
• ./vbseo/includes/functions_vbseo_startup.php
• ./includes/config.php
• ./global.php
• ./includes/class_bootstrap.php
• ./includes/init.php
• ./includes/class_core.php
• ./includes/functions.php
• ./includes/class_friendly_url.php
• ./includes/class_hook.php
• ./includes/functions_cforum.php
• ./includes/functions_bigthree.php
• ./includes/class_postbit.php
• ./includes/class_bbcode.php
• ./includes/functions_reputation.php
• ./includes/class_bootstrap_framework.php
• ./vb/vb.php
• ./vb/phrase.php
• ./packages/vbattach/attach.php
• ./vb/types.php
• ./vb/cache.php
• ./vb/cache/db.php
• ./vb/cache/observer/db.php
• ./vb/cache/observer.php
• ./includes/functions_notice.php

Hooks Called (50):
• init_startup
• friendlyurl_resolve_class
• database_pre_fetch_array
• database_post_fetch_array
• global_bootstrap_init_start
• global_bootstrap_init_complete
• cache_permissions
• fetch_foruminfo
• global_state_check
• global_bootstrap_complete
• global_start
• style_fetch
• global_setup_complete
• friendlyurl_redirect_canonical
• bbcode_fetch_tags
• bbcode_create
• postbit_factory
• postbit_display_start
• cache_templates
• template_register_var
• parse_templates
• notices_check_start
• notices_noticebit
• process_templates_complete
• reputation_image
• postbit_imicons
• bbcode_parse_start
• bbcode_parse_complete_precache
• bbcode_parse_complete
• postbit_display_complete
• memberaction_dropdown
• postbit_attachment
• tag_fetchbit
• tag_fetchbit_complete