Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default help with IF, if it is the answer..

Hi all,

I am a bit of a newb so be gentle here...

I have a sheet that has a lit of names vertically and weeks of the month
horizontally.
In my "total" cell I want to displayt he result fo the following:

If in the range of cells there is an X - then add 40, add 40 for each x in
the range
If in the range of cells there is an H - then add 32, add 32 for each H in
the range
If in the range of cells there is a 1-31 then add 8, if shown as 1,2 (or any
combination of 1-31 like 1,5,8,31 then add 32)

So, if Max takes the week of May 30th off, I input X into that weeks cell
and formula adds 40, if Max takes off the 6th, 7th and 9th of May off, I
input 6,7,9 in that weeks cell and the formula adds 24, if Max takes off the
1st and 2nd, I input 1,2 in the cell and the formula adds 16.

Is this even possible???

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default help with IF, if it is the answer..

Try these:

For "X" :

=COUNTIF(B2:J2,"X")*40

For "H" :

=COUNTIF(B2:J2,"H")*32

For 1-31 :

Assuming that only cells with the "1-31 format" will contain commas.

=(COUNT(B2:J2)+SUMPRODUCT(LEN(B2:J2)-LEN(SUBSTITUTE(B2:J2,",","")))+COUNTIF(B2:I2,"*,*" ))*8

--
Biff
Microsoft Excel MVP


"Lost Will" wrote in message
...
Hi all,

I am a bit of a newb so be gentle here...

I have a sheet that has a lit of names vertically and weeks of the month
horizontally.
In my "total" cell I want to displayt he result fo the following:

If in the range of cells there is an X - then add 40, add 40 for each x in
the range
If in the range of cells there is an H - then add 32, add 32 for each H in
the range
If in the range of cells there is a 1-31 then add 8, if shown as 1,2 (or
any
combination of 1-31 like 1,5,8,31 then add 32)

So, if Max takes the week of May 30th off, I input X into that weeks cell
and formula adds 40, if Max takes off the 6th, 7th and 9th of May off, I
input 6,7,9 in that weeks cell and the formula adds 24, if Max takes off
the
1st and 2nd, I input 1,2 in the cell and the formula adds 16.

Is this even possible???



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
Calculator Answer Doesn't Match Excel Answer GwenH Excel Discussion (Misc queries) 3 October 20th 08 10:17 AM
please i need an answer fadi0007 Excel Worksheet Functions 1 December 24th 05 11:49 AM
HOW TO GET AN ANSWER HELP Excel Discussion (Misc queries) 1 August 23rd 05 08:43 AM
Same row different Answer. Steved Excel Worksheet Functions 2 July 22nd 05 01:34 AM
i cant get the exact answer e.g answer is 13.49% i got 13.00% zai Excel Discussion (Misc queries) 3 June 9th 05 01:00 PM


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