Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with a formula


I am working on a timesheet. I have a dropdown list (Cell W8) wit
categories of time, a cell with manual hours (Cell M8) and a cell wit
converted hours (Cell L8) (formula =(K8-INT(K8))*24). I want to use
formula to show if Cell W8 = General and Cell L8 is less than or equa
to Cell M8 to perform an action. Here's my formula.

If Range("W8").Value = "General" And Range("L8").Value <
Range("M8").Value Then
Range("w8").Interior.ColorIndex = 46
MsgBox ("Adjust numbers for time off or change the type to General
or Holiday, then recalculate.")
Range("o35").Value = "Error Alert! Please review and recalculat
timesheet"

I can get the formula to recognize less than and greater than, but i
it's equal to it still performs as if it's less than. Can you help

--
htmldiv
-----------------------------------------------------------------------
htmldiva's Profile: http://www.excelforum.com/member.php...fo&userid=1941
View this thread: http://www.excelforum.com/showthread.php?threadid=38802

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with a formula


could you clarify?

as I see it ....

you have defined your IF to recognise the "if L8 is less than or Equal
to M8"; but then you say you don't want this in the last line.

you can remove the ='s sign in the <= to stop this behaviour ...?

is that right?


--
optionbase1
------------------------------------------------------------------------
optionbase1's Profile: http://www.excelforum.com/member.php...o&userid=25212
View this thread: http://www.excelforum.com/showthread...hreadid=388025

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Need help with a formula

Do you mean

If Range("W8").NumberFormat = "General" And Range("L8").Value <
Range("M8").Value Then
Range("w8").Interior.ColorIndex = 46
MsgBox ("Adjust numbers for time off or change the type to General or
Holiday, then recalculate.")
Range("o35").Value = "Error Alert! Please review and recalculate
timesheet"
End If

--

HTH

RP
(remove nothere from the email address if mailing direct)


"htmldiva" wrote in
message ...

I am working on a timesheet. I have a dropdown list (Cell W8) with
categories of time, a cell with manual hours (Cell M8) and a cell with
converted hours (Cell L8) (formula =(K8-INT(K8))*24). I want to use a
formula to show if Cell W8 = General and Cell L8 is less than or equal
to Cell M8 to perform an action. Here's my formula.

If Range("W8").Value = "General" And Range("L8").Value <=
Range("M8").Value Then
Range("w8").Interior.ColorIndex = 46
MsgBox ("Adjust numbers for time off or change the type to General
or Holiday, then recalculate.")
Range("o35").Value = "Error Alert! Please review and recalculate
timesheet"

I can get the formula to recognize less than and greater than, but if
it's equal to it still performs as if it's less than. Can you help?


--
htmldiva
------------------------------------------------------------------------
htmldiva's Profile:

http://www.excelforum.com/member.php...o&userid=19415
View this thread: http://www.excelforum.com/showthread...hreadid=388025



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with a formula


yes.


(if that was to me ..

--
optionbase
-----------------------------------------------------------------------
optionbase1's Profile: http://www.excelforum.com/member.php...fo&userid=2521
View this thread: http://www.excelforum.com/showthread.php?threadid=38802

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Need help with a formula

No, the OP.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"optionbase1"
wrote in message
...

yes.


(if that was to me ..)


--
optionbase1
------------------------------------------------------------------------
optionbase1's Profile:

http://www.excelforum.com/member.php...o&userid=25212
View this thread: http://www.excelforum.com/showthread...hreadid=388025



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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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