Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Formula returning "A value used in the formula is of the wrong dat

I am working with Excel 2007.

I have a workbook where one worksheet called My Lottery contains a 6 cell
width by 7 cell height, B6 to G12 table with each cell containing numbers.

On another worksheet I have a table B8 Space, D8 Space up to T8 width and B8
Space, B10 Space up to B16 height.

In Cell B8 I enter =IF('My Lottery'!$B$6:$G$6=1,1,0)
In Cell D8 I enter =IF('My Lottery'!$B$6:$G$6=2,2,0)
In Cell F8 I enter =IF('My Lottery'!$B$6:$G$6=3,3,0)

These all work fine returning the correct number or a zero as expected.

However when I move on to cell H8 and enter =IF('My
Lottery'!$B$6:$G$6=4,4,0) I get the "A value used in the formula is of the
wrong data type".

This carries on acrooss the line of cells to T8

On the next line of cells, B10, D10, F10, etc, the same thing happens with
11, 12 & 13 working fine, 14 to 20 returning the error value.

And so on down the cells, the first 3 working, the next 7 not.

What am I doing, what is going, wrong, help please!
--
Mac Macdonald
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Formula returning "A value used in the formula is of the wrong dat

Mac,

Try using

=IF(COUNTIF('My Lottery'!$B$6:$G$6,1)<0,1,0)

But we could probably come up with a better solution if you described what you want, rather than
what you tried that didn't work.

HTH,
Bernie
MS Excel MVP


"Mac0001UK" wrote in message
...
I am working with Excel 2007.

I have a workbook where one worksheet called My Lottery contains a 6 cell
width by 7 cell height, B6 to G12 table with each cell containing numbers.

On another worksheet I have a table B8 Space, D8 Space up to T8 width and B8
Space, B10 Space up to B16 height.

In Cell B8 I enter =IF('My Lottery'!$B$6:$G$6=1,1,0)
In Cell D8 I enter =IF('My Lottery'!$B$6:$G$6=2,2,0)
In Cell F8 I enter =IF('My Lottery'!$B$6:$G$6=3,3,0)

These all work fine returning the correct number or a zero as expected.

However when I move on to cell H8 and enter =IF('My
Lottery'!$B$6:$G$6=4,4,0) I get the "A value used in the formula is of the
wrong data type".

This carries on acrooss the line of cells to T8

On the next line of cells, B10, D10, F10, etc, the same thing happens with
11, 12 & 13 working fine, 14 to 20 returning the error value.

And so on down the cells, the first 3 working, the next 7 not.

What am I doing, what is going, wrong, help please!
--
Mac Macdonald



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Formula returning "A value used in the formula is of the wrong

Cheers for that Bernie, using it and some conditional formatting I get
exactly what I am looking for.
--
Mac Macdonald


"Bernie Deitrick" wrote:

Mac,

Try using

=IF(COUNTIF('My Lottery'!$B$6:$G$6,1)<0,1,0)

But we could probably come up with a better solution if you described what you want, rather than
what you tried that didn't work.

HTH,
Bernie
MS Excel MVP


"Mac0001UK" wrote in message
...
I am working with Excel 2007.

I have a workbook where one worksheet called My Lottery contains a 6 cell
width by 7 cell height, B6 to G12 table with each cell containing numbers.

On another worksheet I have a table B8 Space, D8 Space up to T8 width and B8
Space, B10 Space up to B16 height.

In Cell B8 I enter =IF('My Lottery'!$B$6:$G$6=1,1,0)
In Cell D8 I enter =IF('My Lottery'!$B$6:$G$6=2,2,0)
In Cell F8 I enter =IF('My Lottery'!$B$6:$G$6=3,3,0)

These all work fine returning the correct number or a zero as expected.

However when I move on to cell H8 and enter =IF('My
Lottery'!$B$6:$G$6=4,4,0) I get the "A value used in the formula is of the
wrong data type".

This carries on acrooss the line of cells to T8

On the next line of cells, B10, D10, F10, etc, the same thing happens with
11, 12 & 13 working fine, 14 to 20 returning the error value.

And so on down the cells, the first 3 working, the next 7 not.

What am I doing, what is going, wrong, help please!
--
Mac Macdonald




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
Formula returning wrong answer Jeff Gross Excel Worksheet Functions 1 September 16th 07 01:04 AM
Formula returning wrong answer Max Excel Worksheet Functions 1 September 14th 07 04:12 PM
Formula returning wrong answer Mike H Excel Worksheet Functions 1 September 14th 07 04:04 PM
Formula returning wrong result. Steve Hunt Excel Worksheet Functions 1 December 2nd 06 09:10 AM
Array formula returning wrong results TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 November 19th 05 10:29 AM


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