Help with Formula

S

stew

Hi can anybody see an error in this Formula which is in E46 on a different
worksheet

=IF(AND(INDIRECT("'Date
Details'!"&ADDRESS(6,(INT(ROW()/1-45)+2)))="GB",INDIRECT("'Date
Details'!"&ADDRESS(7,(INT(ROW()/1-45)+2))))="REHEARSALS","REHEARSALS",INDIRECT("'Date Details'!"&ADDRESS(6,(INT(ROW()/1-45)+2))))

It should do the following
If the 2 conditions
date details C6 =GB AND date details C7 = Rehearsals the result should read
Rehearsals
At the moment it is returning date details C6

Thanks for looking

Stew
 
S

stew

Found It

Parenthesis in the wrong placee

=IF(AND(INDIRECT("'Date
Details'!"&ADDRESS(6,(INT(ROW()/1-45)+2)))="GB",INDIRECT("'Date
Details'!"&ADDRESS(7,(INT(ROW()/1-45)+2)))="Rehearsals"),"Rehearsals",INDIRECT("'Date Details'!"&ADDRESS(6,(INT(ROW()/1-45)+2))))
 
D

David Biddulph

Well, I'm not sure of all of what you are trying to do, but the formula can
be simplified. The divide by 1 doesn't do anything, nor does the INT. You
can also get rid of unnecessary parentheses, and convert -45+2 to -43.

It thus simplifies to
=IF(AND(INDIRECT("'Date Details'!"&ADDRESS(6,ROW()-43))="GB",INDIRECT("'Date
Details'!"&ADDRESS(7,ROW()-43)))="REHEARSALS","REHEARSALS",INDIRECT("'Date
Details'!"&ADDRESS(6,ROW()-43)))

Either your original formula or my replacement will return GB in the
situation you're talking about.

I think you've got your parentheses wrong.
You probably wanted
AND(INDIRECT("'Date Details'!"&ADDRESS(6,ROW()-43))="GB",INDIRECT("'Date
Details'!"&ADDRESS(7,ROW()-43))="REHEARSALS")
not
AND(INDIRECT("'Date Details'!"&ADDRESS(6,ROW()-43))="GB",INDIRECT("'Date
Details'!"&ADDRESS(7,ROW()-43)))="REHEARSALS"

hence the revised version becomes
=IF(AND(INDIRECT("'Date Details'!"&ADDRESS(6,ROW()-43))="GB",INDIRECT("'Date
Details'!"&ADDRESS(7,ROW()-43))="REHEARSALS"),"REHEARSALS",INDIRECT("'Date
Details'!"&ADDRESS(6,ROW()-43)))
 
S

stew

Dear David

I actually found the actual mistake, as you can see.

This project I am doing started with me having no knowledge of excel so I do
come back to Formulas all the time and simplfy them. Thanks for your help

best

stewart
 

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

spot the mistake in formula 3
Please explain this formula 6
Selective on Name 5
Help With Formula 5
repeating a page of formula 0
repeating a page of formula 3
Indirect address 4
Data Validation help 5

Top