ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Function (https://www.excelbanter.com/excel-worksheet-functions/53652-if-function.html)

HRMSN

IF Function
 
I am trying to use the IF function to assess the following:

If any of five or so cells has a number in it (any number) then place in
this cell where the formula is, a label corresponding to the source cell that
has a number in it.

For instance, if my staff person indicated they used 5 hours of vacation
time because they placed the number 5 in a specific cell, then I want the
letter V to be placed here.

I believe I know what to do, but what might be the simplest way to help me
is answering this. Is there a symbor or something that will indicate that
any number will do, or is there a symbor that is opposite of "="?

Hope this makes sense...

HR Specialist

bill k

IF Function
 

a nested if?
this may help

enter in cell F1
=IF(A10,"O",IF(B10,"1.5",IF(C10,"2T",IF(D10,"S ",IF(E10,"V","")))))

this assumes that only one cell of the five has a number


--
bill k


------------------------------------------------------------------------
bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
View this thread: http://www.excelforum.com/showthread...hreadid=481998


Chris Lavender

IF Function
 
ISNUMBER function will differentiate between numbers and text.

< is the opposite of =


HTH
Best rgds
Chris Lav


"HRMSN" wrote in message
...
I am trying to use the IF function to assess the following:

If any of five or so cells has a number in it (any number) then place in
this cell where the formula is, a label corresponding to the source cell

that
has a number in it.

For instance, if my staff person indicated they used 5 hours of vacation
time because they placed the number 5 in a specific cell, then I want the
letter V to be placed here.

I believe I know what to do, but what might be the simplest way to help me
is answering this. Is there a symbor or something that will indicate that
any number will do, or is there a symbor that is opposite of "="?

Hope this makes sense...

HR Specialist




HRMSN

IF Function
 
Hey Bill,

Just out of curiosity, can ya make it work if more than one has a number. I
have always thought that it would not be possible, or a complete programming
nightmare.

"bill k" wrote:


a nested if?
this may help

enter in cell F1
=IF(A10,"O",IF(B10,"1.5",IF(C10,"2T",IF(D10,"S ",IF(E10,"V","")))))

this assumes that only one cell of the five has a number


--
bill k


------------------------------------------------------------------------
bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
View this thread: http://www.excelforum.com/showthread...hreadid=481998



bill k

IF Function
 

You would then use the "AND" or the "OR" functions.
What do you want to show if there are more than one?

An example of the "AND" function


=IF(AND(A4<0,B40),"yes","no")


--
bill k


------------------------------------------------------------------------
bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
View this thread: http://www.excelforum.com/showthread...hreadid=481998


HRMSN

IF Function
 
What I have is a leave sheet designed in Excel. Leave used is entered
(currently) by hand on sheet B in cells that reference the day that the leave
was used. Sheet A pulls the totals of these days into a nice legible format.
It is the "by hand" part I am fixing.

I now have it set up so that the types of leaves used are automatically
pulled from another Excel file (that being the timesheet itself) onto sheet B
of the leave worksheet. The problem has always been, either manually or
automated, that it does not work, if someone uses say 3 hours of vacation,
and 2 hours of sick leave on the same day, because the whole setup is
designed to consider only one type of leave.

Hope this makes sense. It isn't the greatest problem to solve, one that I
would have let lie by the wayside because of the amount of time I will save
with everything else, and the small number of times I have to worry about it.
But if it makes sense, and you know the solution, then have at it. And
Thanks.

"bill k" wrote:


You would then use the "AND" or the "OR" functions.
What do you want to show if there are more than one?

An example of the "AND" function


=IF(AND(A4<0,B40),"yes","no")


--
bill k


------------------------------------------------------------------------
bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
View this thread: http://www.excelforum.com/showthread...hreadid=481998



bill k

IF Function
 

Sounds like you already know the answer.
You would need to change the setup so that you can account for
more than one type of leave per day in the first place.
It should be by codes such as ord 1.5 and 2T SP PAL.
You will then still have to get your colleagues to enter the code
somewhere, rather then using the cell's location. This would make it
more "secure".
No "accidental" faulty returns.
Good Luck


--
bill k


------------------------------------------------------------------------
bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
View this thread: http://www.excelforum.com/showthread...hreadid=481998



All times are GMT +1. The time now is 09:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com