IF Statement Query

  • Thread starter Thread starter MissV
  • Start date Start date
M

MissV

i have an employee list and need to calculate notice periods based on length
of service. col G is length of service in years, col H is length of service
in months. i've figured most of them but having problems with getting a text
output in addition to the numeric value. for example, employee with length
of service >59 mths get 1 week for each complete year of service which is in
col G, but i just get the numeric value in the return, what i need is the
numeric value folowed by the text WEEKS. i've tried adding the text in
inverted commas, brackets, and nothing works. can anyone help? my statement
is as follows;

=IF(H18>143,"12 WEEKS",IF(H18>59,G18,IF(H18>5,"1 MONTH","1 WEEK")))
 
Try it like this:

=IF(H18>143,"12 WEEKS",IF(H18>59,G18&" weeks",IF(H18>5,"1 MONTH","1
WEEK")))

Hope this helps.

Pete
 
hello! thanks for replying so quick.
i tried it and get #VALUE! in those fields. have tried it with and without
a space between " weeks
MissV
 
I presume that H18 does actually contain numbers, and not text values
that look like numbers? And what is in G18?

Pete
 
Hi - both cells contain a Date Diff formula based on dates in E18 and F18.
G18 calculates full calendar years and H18 calcuates full calendar months.
The other Ifs in the statement work fine, it is just the insertion of the
word 'weeks' causing the problem.
 
Back
Top