#1   Report Post  
Thomas
 
Posts: n/a
Default Excel Formulas

Please help me to create this formula:

A1 + A2 = B2

IF A1 + A2 = 2 THEN B2 = 2

IF A1 + A2 = 3 THEN B2 = 3

and so on

IF A1 + A2 = 10 THEN B2 = 1

IF A1 + A2 = 11 THEN B2 = 2

IF A1 + A2 = 12 THEN B2 = 3

IF A1 + A2 = 13 THEN B2 = 4

IF A1 + A2 = 14 THEN B2 = 5

IF A1 + A2 = 15 THEN B2 = 6

IF A1 + A2 = 16 THEN B2 = 7

IF A1 + A2 = 17 THEN B2 = 8

IF A1 + A2 = 18 THEN B2 = 9

IF A1 + A2 = 19 THEN B2 = 1

A1 and A2 must have a value between 1 and 9 otherwise ERROR!

--
Thomas
  #2   Report Post  
NC
 
Posts: n/a
Default

Thomas

the simplest way is to use data validation in the rows where you want
restrict the entries to be between 1 to 9. and then using the formula

left(A1+A2,1) to get the value between 1 & 9 as you want it.

Regards
NC

  #3   Report Post  
NC
 
Posts: n/a
Default

sorry thomas
i mistakenly used "left" function instead of "right"
Regards
NC

  #4   Report Post  
NC
 
Posts: n/a
Default

the correct formula without using any validations.sorry i misunderstood
the problem & sent some wrong messages initially

=IF(OR(OR(0A1,0A2),OR(A110,A210)),"Error",IF(( A1+A2)=10,1,MOD((A1+A2),10)))
Regards
NC

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel 2002 - copying formulas across worksheets Greg Excel Discussion (Misc queries) 1 January 27th 05 10:45 PM
How to make Excel run limited number of formulas on a given worksh John Excel Discussion (Misc queries) 0 January 12th 05 04:29 PM
Way to make Excel only run certain formulas on a worksheet? jrusso Excel Discussion (Misc queries) 0 January 12th 05 04:23 PM
How do I get to master Excel functions and formulas? Basabjit Chowdhury Excel Worksheet Functions 3 December 29th 04 08:15 PM


All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"