#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default if formula


I am working on a time sheet that had one other/code column. In the debit
column, there was an if function( if(I7="c",h7,"") So if the code =C, it
automatically went over to the debit column. We have added an additional
column because sometimes employees might take 2 hrs c (comp) and 2 hrs v
(vacation)
but, I only want it to add i & k if they both =c, or return the value for i
or k if one =c.
looks like this:
h i j k
other- code- other- code - Debit
2 c 3 v 2

2 v 1 c 1
Some of the formulas I have tried are;

=IF(AND(OR(I9="c",K9="c")),(H9+J9),"")
=IF(AND(I8="c",K8="c"),(H8+J8),)

It will make both columns add, regardless of what the code is.
does anybody have any ideas?
thanks for your help!
Sheila

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default if formula

Try in L7:
=IF(AND(I7="c",K7="c"),SUM(H7,J7),IF(I7="c",H7,IF( K7="c",J7,"")))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"srb911" wrote:
I am working on a time sheet that had one other/code column. In the debit
column, there was an if function( if(I7="c",h7,"") So if the code =C, it
automatically went over to the debit column. We have added an additional
column because sometimes employees might take 2 hrs c (comp) and 2 hrs v
(vacation)
but, I only want it to add i & k if they both =c, or return the value for i
or k if one =c.
looks like this:
h i j k
other- code- other- code - Debit
2 c 3 v 2

2 v 1 c 1
Some of the formulas I have tried are;

=IF(AND(OR(I9="c",K9="c")),(H9+J9),"")
=IF(AND(I8="c",K8="c"),(H8+J8),)

It will make both columns add, regardless of what the code is.
does anybody have any ideas?
thanks for your help!
Sheila

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default if formula



"Max" wrote:

Try in L7:
=IF(AND(I7="c",K7="c"),SUM(H7,J7),IF(I7="c",H7,IF( K7="c",J7,"")))
Copy down
--
Max
Singapore



Max,
Thank you very much. That worked great! With all the variations I was
trying, I was getting close. Again, Thank You!
Sheila
http://savefile.com/projects/236895
xdemechanik
---
"srb911" wrote:
I am working on a time sheet that had one other/code column. In the debit
column, there was an if function( if(I7="c",h7,"") So if the code =C, it
automatically went over to the debit column. We have added an additional
column because sometimes employees might take 2 hrs c (comp) and 2 hrs v
(vacation)
but, I only want it to add i & k if they both =c, or return the value for i
or k if one =c.
looks like this:
h i j k
other- code- other- code - Debit
2 c 3 v 2

2 v 1 c 1
Some of the formulas I have tried are;

=IF(AND(OR(I9="c",K9="c")),(H9+J9),"")
=IF(AND(I8="c",K8="c"),(H8+J8),)

It will make both columns add, regardless of what the code is.
does anybody have any ideas?
thanks for your help!
Sheila

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default if formula

welcome, Sheila
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"srb911" wrote
Max,
Thank you very much. That worked great! With all the variations I was
trying, I was getting close. Again, Thank You!
Sheila



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



All times are GMT +1. The time now is 05:20 PM.

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"