PC Review


Reply
Thread Tools Rate Thread

Chain IF formula help

 
 
Dave
Guest
Posts: n/a
 
      26th Jun 2008
Trying to do a chain of IF statements, which will then populate a field with
a value, which I'll later do a COUNTIF against to populate a report. I'm
trying to get this all one cell and it's not working, but I seem to be able
to get it into multiple cells. Some revision help would be greatly
appreciated. For

If A1 = Y, then "1"
If A1 = N, or null, then go to next part
If B1 = N, then "2"
If B1 = Y or null, then go to next part
If C1 is not null, then "3"
If C1 is null, then "4"

Ideally, on the first two nulls instead of chaining to the next part, I'd
return a value and end, but doing it this way seemed easier. More along what
I was looking for would be better, of course.

Thanks in advance for any help!
 
Reply With Quote
 
 
 
 
Glenn
Guest
Posts: n/a
 
      26th Jun 2008
Dave wrote:
> Trying to do a chain of IF statements, which will then populate a field with
> a value, which I'll later do a COUNTIF against to populate a report. I'm
> trying to get this all one cell and it's not working, but I seem to be able
> to get it into multiple cells. Some revision help would be greatly
> appreciated. For
>
> If A1 = Y, then "1"
> If A1 = N, or null, then go to next part
> If B1 = N, then "2"
> If B1 = Y or null, then go to next part
> If C1 is not null, then "3"
> If C1 is null, then "4"
>
> Ideally, on the first two nulls instead of chaining to the next part, I'd
> return a value and end, but doing it this way seemed easier. More along what
> I was looking for would be better, of course.
>
> Thanks in advance for any help!



=IF(A1="Y",1,IF(B1="N",2,IF(C1="",4,3)))
 
Reply With Quote
 
Stephen Lloyd
Guest
Posts: n/a
 
      26th Jun 2008
This should do what you are asking as long as A1 is never Y while B1 is N.

=IF(A1="Y",1,IF(OR(A1="N",A1=""),IF(B1="N",2,IF(OR(B1="Y",B1=""),IF(C1<>"",3,4)))))

"Dave" wrote:

> Trying to do a chain of IF statements, which will then populate a field with
> a value, which I'll later do a COUNTIF against to populate a report. I'm
> trying to get this all one cell and it's not working, but I seem to be able
> to get it into multiple cells. Some revision help would be greatly
> appreciated. For
>
> If A1 = Y, then "1"
> If A1 = N, or null, then go to next part
> If B1 = N, then "2"
> If B1 = Y or null, then go to next part
> If C1 is not null, then "3"
> If C1 is null, then "4"
>
> Ideally, on the first two nulls instead of chaining to the next part, I'd
> return a value and end, but doing it this way seemed easier. More along what
> I was looking for would be better, of course.
>
> Thanks in advance for any help!

 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      26th Jun 2008
I will give these two a try tonight/tomorrow morning gentlemen, and let you
know.

"Dave" wrote:

> Trying to do a chain of IF statements, which will then populate a field with
> a value, which I'll later do a COUNTIF against to populate a report. I'm
> trying to get this all one cell and it's not working, but I seem to be able
> to get it into multiple cells. Some revision help would be greatly
> appreciated. For
>
> If A1 = Y, then "1"
> If A1 = N, or null, then go to next part
> If B1 = N, then "2"
> If B1 = Y or null, then go to next part
> If C1 is not null, then "3"
> If C1 is null, then "4"
>
> Ideally, on the first two nulls instead of chaining to the next part, I'd
> return a value and end, but doing it this way seemed easier. More along what
> I was looking for would be better, of course.
>
> Thanks in advance for any help!

 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      27th Jun 2008
Should not be, but as these are manual entries fields, you have to assume
human error can and will happen. That said, I think I can use your formula
to give an out to the nulls when they occur (and create values "5" and "6",
for example). Going to give it a try...

"Stephen Lloyd" wrote:

> This should do what you are asking as long as A1 is never Y while B1 is N.
>
> =IF(A1="Y",1,IF(OR(A1="N",A1=""),IF(B1="N",2,IF(OR(B1="Y",B1=""),IF(C1<>"",3,4)))))
>
> "Dave" wrote:
>
> > Trying to do a chain of IF statements, which will then populate a field with
> > a value, which I'll later do a COUNTIF against to populate a report. I'm
> > trying to get this all one cell and it's not working, but I seem to be able
> > to get it into multiple cells. Some revision help would be greatly
> > appreciated. For
> >
> > If A1 = Y, then "1"
> > If A1 = N, or null, then go to next part
> > If B1 = N, then "2"
> > If B1 = Y or null, then go to next part
> > If C1 is not null, then "3"
> > If C1 is null, then "4"
> >
> > Ideally, on the first two nulls instead of chaining to the next part, I'd
> > return a value and end, but doing it this way seemed easier. More along what
> > I was looking for would be better, of course.
> >
> > Thanks in advance for any help!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ownership chain Nicholas Paldino [.NET/C# MVP] Microsoft C# .NET 3 11th Apr 2007 04:18 PM
Setting up a chain David Microsoft ASP .NET 4 25th Jul 2005 02:25 PM
How many IDE in Chain Crhoff DIY PC 6 18th Dec 2003 02:39 PM
chain of responsibility Jamie Microsoft Dot NET Framework Forms 1 23rd Oct 2003 11:43 AM
How long can a LPT chain be? Dirk Fust Printers 2 5th Aug 2003 01:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:30 PM.