COUNTIF or not to COUNTIF on a range in another sheet

G

Guest

I have a report over 2 separate sheets in a workbook.

On the first sheet I have my core data, covering approx. 8 columns,
inclusive of date, load number (in columns B and C) and cases (in column H).
On the second sheet I am currently manually inputting the result of data
entered into the first sheet.

The data in columns B, C and H are what I manually input into the second
sheet.

In this 2nd sheet I have column A with the date in the same format as on the
first worksheet along with column D being the total number of loads for that
date and column E being the total number of cases also for that date.
Unfortunately on the first worksheet I sometimes have dates where no data is
available and put this in as "No Issues", but having used COUNTIF against the
date find that No Issues is being counted, as I obviously have entered the
date into the first sheet.

e.g. of 2nd sheet in workbook:-
W/C 12/09 Total Loads Total Cases Failure Loads Failure Cases
12-Sep
13-Sep
14-Sep
15-Sep
16-Sep
TOTAL 0 0 0 0

As a sample, I had used =COUNTIF(Sheet1!B2:I6,"=12-Sep") against the Failure
Loads for 12-Sep, which returns the correct number, but unfortunately when
going for 13-Sep returned 1, even though it was No Issues, so should be as a
0.

Is there any suggestion to amend the above COUNTIF calculation, to give me
what I require, or something else to do this for me.

Many thanks.

Ellie
 
P

Paul Sheppard

Ellie said:
I have a report over 2 separate sheets in a workbook.

On the first sheet I have my core data, covering approx. 8 columns,
inclusive of date, load number (in columns B and C) and cases (in
column H).
On the second sheet I am currently manually inputting the result of
data
entered into the first sheet.

The data in columns B, C and H are what I manually input into the
second
sheet.

In this 2nd sheet I have column A with the date in the same format as
on the
first worksheet along with column D being the total number of loads for
that
date and column E being the total number of cases also for that date.
Unfortunately on the first worksheet I sometimes have dates where no
data is
available and put this in as "No Issues", but having used COUNTIF
against the
date find that No Issues is being counted, as I obviously have entered
the
date into the first sheet.

e.g. of 2nd sheet in workbook:-
W/C 12/09 Total Loads Total Cases Failure Loads Failure Cases
12-Sep
13-Sep
14-Sep
15-Sep
16-Sep
TOTAL 0 0 0
0

As a sample, I had used =COUNTIF(Sheet1!B2:I6,"=12-Sep") against the
Failure
Loads for 12-Sep, which returns the correct number, but unfortunately
when
going for 13-Sep returned 1, even though it was No Issues, so should be
as a
0.

Is there any suggestion to amend the above COUNTIF calculation, to give
me
what I require, or something else to do this for me.

Many thanks.

Ellie

Hi Ellie

Your formula looks ok except you don't need = infront 0f 12-Sep

To help further put a sample of the data from the first sheet


As an alternative, you could just put subtotals on your > Data >
Subtotals at each change of date
 
G

Guest

Hi Paul

WEEK DATE LOAD DOCKET CUSTOMER HAULIER REASON CODE CASES COMMENTS
Week 37 12-Sep 81022 54171503 Asda Normanton WRW 14 2560 Failed to be
collected by Asda backhaul. To be rebooked.
12-Sep 81023 54171505 Asda Normanton WRW 14 2080 Failed to be collected by
Asda backhaul. To be rebooked.
12-Sep 80986 54171508/09 Asda Washington WRW 5 2254 Sub-contractor
collected the wrong load. To be rebooked.
12-Sep HAL 62106 85201260/63/80 Asda Grangemouth HAL 2 3481 Booking time
23:00hrs. Delayed en route. To be rebooked.
12-Sep 80985 54171538/39/40/41 Asda Lutterworth WRW 12 4914 Booking time
22:00hrs. To be rebooked.
13-Sep NO ISSUES
14-Sep HAL 62118 85201363/71/76 Asda Wigan HAL 6 2836 Vehicle broke down.
Rebooked 16/09/05 @ 19:20hrs.
14-Sep KAM 61784 85201328/29/30 Asda Lutterworth KAM 4 4741 Delays loading.
Load running approx. 1.5hrs late.

The above is a sample of the first sheet mentioned below. Hope this helps.

Thanks for letting me know about the = with the date. Wasn't sure if it was
necessary or not.

Ellie
 
G

Guest

Sorry, also forgot to mention that for the 5th day on the 2nd sheet (16-Sep),
this incorporates the Friday, Saturday and Sunday dates (16-18 Sep) from the
1st sheet.

Ellie
 
P

Paul Sheppard

Hi Ellie

To get over the problem of No Issues on the 13th instead of COUNTIF use
this formula instead >

=SUM((Sheet1!$B$2:$B$9=Sheet2!A2)*(Sheet1!$C$2:$C$9<>""))

This needs to be enterred as an array, so type in or copy/paste the
formula and instead of pressing Enter press CTRL/SHIFT/ENTER all
together
This will make the formula look like this >

{=SUM((Sheet1!$B$2:$B$9=Sheet2!A2)*(Sheet1!$C$2:$C$9<>""))}

This is looking at the date column B and the load column C, I assume
you put No issues in the comments so column C for the 13th will be
blank, and counts instances of a date so long as the load column is
blank

Haven't had time to work out the weekend issue, but I'm sure someone on
here will help

Have attached a zip copy of the file I worked on. Sorry am going on
holiday tomorrow, not back till 2nd October, if you haven't sorted it
by then e-mail me

(e-mail address removed)


+-------------------------------------------------------------------+
|Filename: Asda.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3826 |
+-------------------------------------------------------------------+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help!!! 3
Formula array adaptation 3
countif 2
Countif, plus ? 8
Mutiple COUNTIF or equivalent. 8
Countif maybe 4
Countif Range not working 4
Excel A CountIF question... I think 2

Top