- 589K Members
- 5,346 Online
- 714K Conversations

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Home
- :
- Excel
- :
- General Discussion
- :
- Problem with a Excel formula

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Subscribe to RSS Feed
- Mark Conversation as New
- Mark Conversation as Read
- Pin this Conversation for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

steven Green

Occasional Contributor

08-21-2017
02:00 PM
- last edited on
07-25-2018
09:56 AM
by
TechCommunityAP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-21-2017
02:00 PM
- last edited on
07-25-2018
09:56 AM
by
TechCommunityAP

Hi Not sure what I've done but the only thing I've changed is the number of cells/ lines in the range from: =MAX(IF('Draw Results'!C1:C2248={3,4},'Draw Results'!D1:D2248))

to =MAX(IF('Draw Results'!C1:C2283={3,4},'Draw Results'!D1:D2283))

What it does is to show the last draw number entered in in column A where either 3 or 4 are entered in column D. The answer should be 2257 but it comes out as "0"

The second formula was changed

from: =MAX(IF('Draw Results'!C1:C2248={3,4},'Draw Results'!A1:A2248))

to =MAX(IF('Draw Results'!C1:C2283={3,4},'Draw Results'!A1:A2283))

What it should show is the date of the last draw entered in column A, where 3 or 4 is entered in column D. the answer should be 08/07/17 but comes out as 00/01/00.

Each formula is entered with ctrl+shift+ebter

Tried other excell help sites but got no help so please don't let me down

Labels:

32 Replies

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-21-2017 03:15 PM

Hi Steven

Please re-check your updated formula are array ones

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-22-2017 01:49 AM

Hi Steven,

That's just an assumptions - your formula always returns zero, other words always returns FALSE, thus most probably doesn't work on entire range, that could means it's entered not as array formula.

Stay on the cell with your formula, shift into cell edit mode (F2 or double-click) and Ctrl+Shift+Enter then. {} shall appear.

To check how it works in ribbon Formulas -> Evaluate formula and follow the steps. But better to shorten your range for such tests.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-22-2017 02:28 PM

Hello again. ive tried that and even shortened the range but it is still the same. Not sure what iam looking at when i do the evaluate thing.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-22-2017 03:05 PM

Steven,

Do i understood correctly the only thing you did is change 2248 on 2283 in your formulas? And perhaps that's misprint in your description

to =MAX(IF('Draw Results'!C1:C2283={3,4},'Draw Results'!D1:D2283))

What it does is to show the last draw number entered in in column A where either 3 or 4 are entered in column D. The answer should be 2257 but it comes out as "0"

And i guess it's misprint in your description - 3 or 4 are entered in column C, not D. Number is returned from column D, not A. At least that's what your formula do - returns max in D for the rows where 3 or 4 in C.

Anyway, zero means formula doesn't find 3 or 4. Another reason could be cells in C are formatted as text and you have text "3" instead of number 3. You may check, for example, by ISNUMBER on the cell with this value.

To shorten the range for the test you may take C2256:C2258 (instead of C1:C2283), same for other ranges. Evaluate shall show something like

MAX(IF({FALSE,FALSE;TRUE,FALSE;FALSE,FALSE},D2258:D2258))

on second step. If in C2257 is number 3.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-23-2017 03:49 PM

Hi Sergei.

Sorry i took so long to reply but ive been working hard. Thank you for your help with that formula but i have manged to work around the problem using a different set of formulas.

How ever i do have a problem with another formula on the sheet (note for some reason formulas with the same long cell ranges all stopped working when they reached 2248)

First ill explain what the formula does. The sheet is a Lotto program that uses information on the sheet to predict a date when the number in question is likly to come out again, based on when it was last drawn and the average number of days between draws for each number (dont laugh i know this is impossible to be 100% correct due to random chance).

(note; the number of rows has been reduced)

The formula in cell E317 is =INDEX($B1:$B309,MAX(IF((E1:E309>0),ROW(E1:E309),0)))+ROUND(E316,0)

Colum B holds the date of each draw.

Colum E represents the number 1. (numbers 1- 59 are in coloums E to BK) Each time number a is drawn then and numer 1 (when drawn as a main ball) or number 2 (when drawn as a bonus ball) is entered in the relevent colum next to the date it was drawn.

Cell E316 contains the day average (this is the day total from the the first to the last draw entered devided by the number of times drawn).

The problem is that when i use ctrl+shift+enter the formula return #VALUE in cell 317.

Any questuion please let me know.

Steven

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-24-2017 05:52 AM

Hi Steven,

In general your formula shall work. You may use equivalent which doesn't require array formula

=INDEX($B1:$B309,MATCH(MAX(E1:E309),E1:E309,0)))+ROUND(E316,0)

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-24-2017 08:14 AM

hI Sergei. i have imput the formula you sent. If you have a look at the attachment youll see what it coming up with. Thank you for your help.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-24-2017 10:01 AM

Sorry, it was misprint

=INDEX($B1:$B309,MATCH(MAX(E1:E309),E1:E309,0))+ROUND(E316,0)

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-24-2017 03:35 PM

Hi again. The formula seems to be working but the date that it gives is in the past. It should show the next date that number might be drawn. Any suggestions?

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-25-2017 11:06 AM

Steven,

Could you give the sample file with the data up to 10 records with the comment on it what shall be received?

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-27-2017 01:14 AM

Hi Sergei. Ive attached a copy of the sheet have a look please the formula you sent is on line 317.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-27-2017 06:02 AM

Hi Steven,

Thank you, it's clear now. First comment - why do you use outdated format for Excel file (.xls)? I attached both, try one with .xlsx.

Second - your initial array formula

=INDEX($B1:$B309,MAX(IF((E1:E309>0),ROW(E1:E309),0)))+ROUND(E316,0)

works fine. Most probably you didn't enter it as an array formula.

To do that

1) Double click on cell with your formula

2) Press and hold CTRL and SHIFT simultaneously

3) Press ENTER

4) Release all keys

Curly brackets shall appears at the beginning and end of formula.

Your formula could be bit simplified

=MAX((E1:E309>0)*$B1:$B309)+ROUND(E316,0)

above is also array formula. Here you find maximum value in B1:B309 filter it by column E (all rows with any positive numbers).

Not to use array formulas another couple of variants could be

=MAX(INDEX((E1:E309>0)*$B1:$B309,))+ROUND(E316,0)

that's similar to previous one, however no array formula is required. INDEX returns an array with all dates in B1:B309 for which there is any positive number in next column, otherwise zero. We take maximum date in that array.

One more variant for not array formula

=LOOKUP(2,1/(E1:E309>0),$B1:$B309)+ROUND(E316,0)

Second parameter returns a vector with 1 or errors as results of dividing the 1 on TRUE and FALSE. We lookup 2 in this vector (actually any number greater than 1), since no such number in the vector, the position of latest 1 will be returned. Finally the date in B1:B309 at this position.

In attached files all above formulas are sequentially in E325, E326, E327, E328

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-28-2017 02:46 AM

Thank you again. i will try them out when i can.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-28-2017 02:53 AM

HI Again could I save a file created in .xls format as a .xlsx file.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-28-2017 03:50 AM

Hi Steven,

Yes, sure - if your Excel version is 2007 or any later

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-31-2017 03:41 AM

Hi Sergei.

Thank you for your help on this. I am not sure what or if iam doing anything wrong but the original formula still doesn't work even though i've shortened the range and i am using ctrl+shift+enter. The second formula works ok but when i add another 1 or 2 in the colloum it stops working and shows #VALUE in the cell. This is the same with the other formulas.

Iam going out on a limb and iam sending you the full sheet, almost as i use it, as i am beginning to think that the shhet may be iver complicated and this might be the problem. Let me know what you think.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-31-2017 05:51 AM

Hi Steven,

Strange. I have no problems with your file, no #VALUE in the cells. Both for array formulas (row 322) and lookup formula (row 317).

Could you please indicate in which exactly cell you add 1 (e.g. F248) and in which cell #VALUE appears (e.g. F317) after that.

And on which version of Excel you are?

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-03-2017 03:00 PM

Hi Sergei. #VALUE appears in the cell E317. not sure what is going on, weather it me or some problem with the program iam not sure.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-04-2017 02:23 AM

Hi Steven,

I can't reproduce that. Whatever i enter in cells from E1 to E247 i have no error in E317.

Is file you attached with previous post with error? And please, what's your Excel verson?

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-10-2017 07:15 AM

Hello again. sorry it took so long to reply. My last message i said about it not working ok. SORRY it seems its my fault. i had not put the formula in right. It seems ok but ill let you know. thank you for your help.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-10-2017 01:56 PM

Hi Again. seems i've not got it figured out. I have attached the sheet. As you can see ive put the draw results in row 249. and in row 317 under the draw results then #VALUE appears in the that cell. not sure whay but could you please let me know what ive done wrong. Thank you

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-12-2017 08:59 AM

Hi Steven,

Sorry, missed this your reply. I tried to play with the file you send a week or so ago and was not able to reproduce the error. But that was no data in row 249.

Could you please send me the file where you see the error?

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-21-2017 01:48 PM - edited 09-21-2017 01:49 PM

Hello Again. Ive attached the sheet. wot ive done is and your formula to the cells in row 317. Ive added the a new set of draw results in to row 249. If you look at cells K317, R317 etc you'll see #VALUE

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-22-2017 04:52 AM

Hi Steven,

Unfortunately in the file you attached i don't see the formulas (only #REF) since 'General Lotto Info' tab is removed. Could you please send full file to check?

If you care about the confidentiality send the link where i can download it with in-private message.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-27-2017 01:55 PM

Hi Sorry about that. i had to delete some of the none essential page and deleted the wrong one. Ill try again. Please try this one.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-28-2017 03:54 AM

Hi Steven,

That's since in B249 you enter the text "12.7.17" instead of the date in your locale format. If change on date (actually number) formulas work. Please see attached.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-01-2017 01:48 PM

Hi Sergei. Ive done as you have suggested but still getting the same probelm. Ive attached a PDF of a screen shot of what i get when i try to open the file to work on it. I have circled the cells that have #Value in them incase the image is not great.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-02-2017 06:43 AM

Hi Steven,

As the date you have to enter the date in your locale format (12/07/2017 by default for UK) or simply the number 42928 (which is equivalent of that date). Or by refrence on previous date

=B248+4

And only after that apply format if necessary.

Please see the file in my previous post.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-13-2017 01:13 PM

Hi Sorry it took so long to reply but my laptop has been away for repair. Will try your suggestion as sson as i can. thank you

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-29-2017 02:33 PM

Hi service. Tried all you said and looked at the file you attached but still won't work.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-05-2017 01:23 AM

Steven,

That could be something else, but i see no errors in my copy of the file. How your date is entered you may check in formula bar. If as text

you have an error, if as date

all works

Related Conversations

I cannot delete external links--even after following directions

Jake_V1976
in
Excel
on
04-03-2020
22
Views

0 Likes

0 Replies

Share

Microsoft Store

Education

Developer