Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel - formula anb VBA

I have a spreadsheet setup thats downloads data from our DB2tables, this
look at the employees and the days off sick.

I have been able to get everything to work ok but I'm having trouble
with one lot of code and formula.

The row that it look at is "K" and this contains either "-" or dates
that have been taken as ILL eg..

A .... G H I
J K
NAME Start Finish Leave Type Hours
Med Certificate
Joe Smith 01.1.04 05.1.04 ILL 8
-


8

Mrs White 31.12.03 31.12.03 ILL 8
31.12.03-31.12.03
01.1.04 02.1.04 ILL
16 -
03.1.04 03.1.04 ILL
8 03.1.04-03.1.04


OK what I have is

=IF(E3=0,"",IF(IF(A30,COUNTA(SelectData(CONCATENA TE("k",TEXT(ROW(A3),"0")))),"")="-","
",IF(A30,COUNTA(SelectData(CONCATENATE("k",TEXT(R OW(A3),"0")))),"")))

Public Function SelectData(StartCell As String) As Range
Set SelectData = Range(Range(StartCell),
Range(StartCell).End(xlDown))
End Function

But this seems to still count the "-" rather than just the dates

Waht I need to be able to do is count the number of dates or values in
column "K" to the employee but not the "-".


eg

Joe Smith 0
Mrs White 2

Is this possible


---
Message posted from http://www.ExcelForum.com/

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
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
match formula - 2 excel files:#1 hasthis formula, 2nd has the Raw DS Excel Worksheet Functions 4 October 7th 06 12:25 AM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


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