Recalculate the Formula


"Excel VBA Help"

 


Play Friv Now - Play Friv Games
Go Back   The Code Cage Forums > Microsoft Topics > Microsoft Excel Forum
Our Info Pages:-
The Code Cage - Microsoft Office help

Notices

Microsoft Excel Forum Members Post questions in this forum if they are related to using Microsoft Excel, this includes Worksheet Functions, Excel VBA Programming, Simple Macro Code & Charting, Excel formula etc.

New Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 1st June 2010, 23:16
Malcolm's Avatar
Malcolm
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default Recalculate the Formula
     Excel: Functions   


------ Register to get rid of these "In Post" ads! ------

Category: Excel: Functions   

Earlier today I was given 2 formulas for a problem I was having. I started
with a formula that worked and I wanted to add 2 conditions to it. The
formula was:

=IF(OR(‘Source Sheet’!C10={“”,”C”, “B”}),’Source Sheet’!B10).

I wanted to add a condition that would allow if C10=”S” for any number that
I entered in the source sheet B10 to be entered in the destination sheet B10.
The second condition would be if “D” was entered in the source sheet a 2 and
only 2 would be entered in the destination sheet B10. There is no number in
the B10 of the source sheet for “D”, and that is the way it is supposed to
be. Here are the formulas I was given, neither worked. Please help.

=IF(OR(C10={"","C","B"}),B10,IF(ISNUMBER(B10),IF(C10="S",B10,
IF(AND(C10="D",B10=2),2,"")),""))

=IF(OR('Source Sheet'!C10={"","C","B"}),'Source Sheet'!B10,IF(OR('Source
Sheet'!C10={"","D","S"}),2,""))

Thanks,
Malcolm


The Code Cage Advertisment
Advertisement
  #2  
Old 2nd June 2010, 07:18
Tom-S's Avatar
Tom-S
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default RE: Recalculate the Formula

------ Register to get rid of these "In Post" ads! ------


Assuming all references to C10 are on the Source Sheet, try this:

=IF(OR('Source Sheet'!C10={"","C","B"},AND('Source
Sheet'!C10="S",ISNUMBER('Source Sheet'!B10))),'Source Sheet'!B10,IF('Source
Sheet'!C10="D",2,""))

What it should do is make the cell in which this formula is placed on the
Destination Sheet adopt the contents of B10 on the Source Sheet, first of all
if any one of these is true:

Source Sheet C10=""
Source Sheet C10="C"
Source Sheet C10="B"
Source Sheet C10="S" AND Source Sheet B10 contains a number

If none of those conditions are true, it will then test if Source Sheet
C10="D", and if it is then the cell in which this formula is placed on the
Destination Sheet contains a 2.

If none of the above conditions are met then the cell in which this formula
is placed on the Destination Sheet contains an empty string ("").

Hope this captures the conditions you're trying for.

Regards,

Tom


"Malcolm" wrote:

> Earlier today I was given 2 formulas for a problem I was having. I started
> with a formula that worked and I wanted to add 2 conditions to it. The
> formula was:
>
> =IF(OR(‘Source Sheet’!C10={“”,”C”, “B”}),’Source Sheet’!B10).
>
> I wanted to add a condition that would allow if C10=”S” for any number that
> I entered in the source sheet B10 to be entered in the destination sheet B10.
> The second condition would be if “D” was entered in the source sheet a 2 and
> only 2 would be entered in the destination sheet B10. There is no number in
> the B10 of the source sheet for “D”, and that is the way it is supposed to
> be. Here are the formulas I was given, neither worked. Please help.
>
> =IF(OR(C10={"","C","B"}),B10,IF(ISNUMBER(B10),IF(C10="S",B10,
> IF(AND(C10="D",B10=2),2,"")),""))
>
> =IF(OR('Source Sheet'!C10={"","C","B"}),'Source Sheet'!B10,IF(OR('Source
> Sheet'!C10={"","D","S"}),2,""))
>
> Thanks,
> Malcolm
>


  #3  
Old 2nd June 2010, 13:54
Malcolm's Avatar
Malcolm
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default RE: Recalculate the Formula

------ Register to get rid of these "In Post" ads! ------


Tom, Hi,
Bingo!! You did it! This solution works great. Thank you, Thank you, and
Thank you.

Best Regards,
Malcolm

Ps; Did I say Thank you!

"Tom-S" wrote:

> Assuming all references to C10 are on the Source Sheet, try this:
>
> =IF(OR('Source Sheet'!C10={"","C","B"},AND('Source
> Sheet'!C10="S",ISNUMBER('Source Sheet'!B10))),'Source Sheet'!B10,IF('Source
> Sheet'!C10="D",2,""))
>
> What it should do is make the cell in which this formula is placed on the
> Destination Sheet adopt the contents of B10 on the Source Sheet, first of all
> if any one of these is true:
>
> Source Sheet C10=""
> Source Sheet C10="C"
> Source Sheet C10="B"
> Source Sheet C10="S" AND Source Sheet B10 contains a number
>
> If none of those conditions are true, it will then test if Source Sheet
> C10="D", and if it is then the cell in which this formula is placed on the
> Destination Sheet contains a 2.
>
> If none of the above conditions are met then the cell in which this formula
> is placed on the Destination Sheet contains an empty string ("").
>
> Hope this captures the conditions you're trying for.
>
> Regards,
>
> Tom
>
>
> "Malcolm" wrote:
>
> > Earlier today I was given 2 formulas for a problem I was having. I started
> > with a formula that worked and I wanted to add 2 conditions to it. The
> > formula was:
> >
> > =IF(OR(‘Source Sheet’!C10={“”,”C”, “B”}),’Source Sheet’!B10).
> >
> > I wanted to add a condition that would allow if C10=”S” for any number that
> > I entered in the source sheet B10 to be entered in the destination sheet B10.
> > The second condition would be if “D” was entered in the source sheet a 2 and
> > only 2 would be entered in the destination sheet B10. There is no number in
> > the B10 of the source sheet for “D”, and that is the way it is supposed to
> > be. Here are the formulas I was given, neither worked. Please help.
> >
> > =IF(OR(C10={"","C","B"}),B10,IF(ISNUMBER(B10),IF(C10="S",B10,
> > IF(AND(C10="D",B10=2),2,"")),""))
> >
> > =IF(OR('Source Sheet'!C10={"","C","B"}),'Source Sheet'!B10,IF(OR('Source
> > Sheet'!C10={"","D","S"}),2,""))
> >
> > Thanks,
> > Malcolm
> >


The Code Cage Advertisment
Advertisement
New Reply
The Code Cage at Facebookhe Code Cage at Twitter


Tags
formula, recalculate

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

The Code Cage Affilliates



http://www.thecodecage.com/forumz tested by McAfee Security http://www.thecodecage.com/forumz tested by McAfee Security

All times are GMT +1. The time now is 15:55.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Template-Modifications by TMS
No part of this board, functionality or creatives may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
Copyright ©2008 - , Simon lloyd.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application they represent and are used with permission from Microsoft
UA-8135493-1
Cultural Forum | Study at Malaysian University
X vBulletin 3.8.7 Debug Information
  • Page Generation 0.17374 seconds
  • Memory Usage 6,305KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footerEnd
  • (1)ad_footerStart
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_headerEnd
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_leftcolumn_code
  • (1)ad_navbar_below
  • (2)ad_postbit_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (3)helpful_answers
  • (1)helpfulanswers_javascript
  • (1)navbar
  • (3)navbar_link
  • (2)navbar_noticebit
  • (41)option
  • (3)post_thanks_box
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_ctoptip
  • (3)postbit_wrapper
  • (1)showthread_changepostsowner_link
  • (1)showthread_extra_fields
  • (1)showthread_quickreply_mrgdp
  • (1)showthread_reason_popup
  • (1)spacer_close
  • (1)spacer_open
  • (1)su_form
  • (2)tagbit
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_datastore.php
  • ./includes/class_hook.php
  • ./awcoding/plugins/awc.php
  • ./awcoding/plugins/ds.php
  • ./awcoding/plugins/ss.php
  • ./includes/functions_notice.php
  • ./mobiquo/smartbanner.php
  • ./mobiquo/include/classTTConnection.php
  • ./mobiquo/smartbanner/head.inc.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/vbatags.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php
  • ./includes/functions_misc.php
  • ./includes/functions_prefix.php 

Hooks Called:
  • init_startup
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_check_criteria
  • notices_noticebit
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • helpfulanswers_showthreadorpost
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • helpfulanswers_show_normal
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • error_fetch
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete