Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
iwgunter
 
Posts: n/a
Default Can You Translate This Function Into Excel Format?


I can write functions in PHP & MySQL, but can't get my headd around
another language for Excel.

I have a spreadsheet with 2 columns for dates (B & C), a duration
column (D) and a Yes or No column (E). We fill column B with the date a
car arrives at our workshop, C with the date it leaves, D with the
duration of time we had it and E if it has been added to the insurance
database [if it is with us more than 14 days].

I need to work out the duration column with the following style of
function...

Code:
--------------------
if $C2="" then ($D2="todays date"-$B2) else ($D2=$C2-$B2)
--------------------

I also need a function to perfom the following conditional format...

Code:
--------------------
if $D214
if $E2="Yes" - Highlight row in BLUE
else - Highlight row in RED
--------------------

Any help with this would be really grateful
Ian


--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile: http://www.excelforum.com/member.php...o&userid=15441
View this thread: http://www.excelforum.com/showthread...hreadid=399523

  #2   Report Post  
Dnereb
 
Posts: n/a
Default


Can you rephrase your code in words?
I'm not into PHP but I can VB


--
Dnereb
------------------------------------------------------------------------
Dnereb's Profile: http://www.excelforum.com/member.php...o&userid=26182
View this thread: http://www.excelforum.com/showthread...hreadid=399523

  #3   Report Post  
hideki
 
Posts: n/a
Default


for if statement, put like this in your cells D2
=IF(C2="",TODAY()-B2,C2-B2)

and for your conditional format

criteria1:
formula=AND(D214,E2="Yes")
set your pattern color to blue

criteria2:
value greater than 14
set your color to red


--
hideki
------------------------------------------------------------------------
hideki's Profile: http://www.excelforum.com/member.php...o&userid=18903
View this thread: http://www.excelforum.com/showthread...hreadid=399523

  #4   Report Post  
iwgunter
 
Posts: n/a
Default


Cheers for the help guys. I have got it working now. I changed it around
a bit and now use...

Code:
--------------------
=($C2<"") - Fill Green
=($E2="Yes") - Fill Blue
=($D214) - Fill Red
--------------------


+-------------------------------------------------------------------+
|Filename: ExcelMIDLog.GIF |
|Download: http://www.excelforum.com/attachment.php?postid=3753 |
+-------------------------------------------------------------------+

--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile: http://www.excelforum.com/member.php...o&userid=15441
View this thread: http://www.excelforum.com/showthread...hreadid=399523

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
"Group" function very slow with Excel 2003 :( ... While very quick with Excel2000 :O) Alain79 Excel Discussion (Misc queries) 4 June 14th 05 07:34 AM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Excel enters date as a text format Kane Excel Discussion (Misc queries) 3 March 22nd 05 09:20 PM
How do I unhide the cell format function in Excel 2000 Len Melcer Excel Worksheet Functions 2 December 15th 04 06:49 PM
Statistical Excel Function Question within Excel 2000... Drew H Excel Worksheet Functions 3 October 31st 04 06:55 PM


All times are GMT +1. The time now is 04:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"