Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Formula problems

Hello;
I sent in a question this morning but it seems to have disappeared. it is an
if and then situation. this was the first response, but it didn't work.

=IF(E1=1,J1+J5,IF(E1=2,J1+J6,""))

if cell E1=1 then add cell J1 to cell J5
if cell E1=2 then add cell J1 to cell J6

thank you for your help,

Sunnydazy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula problems

Make sure E1 is not formatted as Text... if there is an actual number in E1,
the formula will work.

Rick


"sunnydazy" wrote in message
...
Hello;
I sent in a question this morning but it seems to have disappeared. it is
an
if and then situation. this was the first response, but it didn't work.

=IF(E1=1,J1+J5,IF(E1=2,J1+J6,""))

if cell E1=1 then add cell J1 to cell J5
if cell E1=2 then add cell J1 to cell J6

thank you for your help,

Sunnydazy


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Formula problems

=IF(E1=1,SUM(J1,J5),IF(E1=2,SUM(J1,J6),0))
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,344
Default Formula problems

Hi,

As stated this is the correct solution:

=IF(E1=1,J1+J5,IF(E1=2,J1+J6,""))

So if its not working your description of the problem is incomplete, my
guess is you want to add 0 to J1 if E1 does not equal 1 or 2, if so then

=J1+IF(E1=1,J5,IF(E1=2,J6,0))
--
Cheers,
Shane Devenshire


"sunnydazy" wrote:

Hello;
I sent in a question this morning but it seems to have disappeared. it is an
if and then situation. this was the first response, but it didn't work.

=IF(E1=1,J1+J5,IF(E1=2,J1+J6,""))

if cell E1=1 then add cell J1 to cell J5
if cell E1=2 then add cell J1 to cell J6

thank you for your help,

Sunnydazy

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Formula problems

It wasn't that difficult to track down!!

http://www.microsoft.com/office/comm...0-7454f7626c94

"sunnydazy" wrote:

Hello;
I sent in a question this morning but it seems to have disappeared. it is an
if and then situation. this was the first response, but it didn't work.

=IF(E1=1,J1+J5,IF(E1=2,J1+J6,""))

if cell E1=1 then add cell J1 to cell J5
if cell E1=2 then add cell J1 to cell J6

thank you for your help,

Sunnydazy

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
Formula Problems Ayo Excel Discussion (Misc queries) 2 February 10th 10 01:24 AM
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
If formula problems Canon Excel Discussion (Misc queries) 4 May 6th 09 03:42 PM
Formula Problems Mike Excel Discussion (Misc queries) 3 September 14th 06 05:17 PM
Formula Problems Ted Excel Worksheet Functions 13 November 21st 05 08:14 PM


All times are GMT +1. The time now is 05: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"