Solved IF AND Statement

July 15, 2011 at 20:51:42
Specs: Windows 7, Intel Core2Duo/8GB
Hi, how would I write a formula for B2:F4 on Sheet 1 to yield a "Y" if there is a data in B1:B7 on Sheet 2?

Sheet 1
	A	B	C	D	E	F
1		12/19	12/20	12/21	12/22	12/23
2	Work	Y	Y		Y	Y
3	Sick	Y
4	Vac					Y

Sheet 2
1	12/19	Work
2	12/19	Sick
3	12/20	Work
4	12/21	
5	12/22	Work
6	12/23	Work
7	12/23	Vac

If column A on sheet 1 has another variable, then it would be used in column B of sheet 2.


See More: IF AND Statement

Report •

#1
July 16, 2011 at 02:52:42
✔ Best Answer
I assume (hope) you are using 2007 or 2010...

Put this in B2 and drag it over and then down.

=IF(COUNTIFS(Sheet2!$A$1:$A$7,B$1,Sheet2!$B$1:$B$7,$A2)>0,"Y","")

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
July 16, 2011 at 07:58:40
You're a genius! Thanks a lot!

Mike


Report •
Related Solutions


Ask Question