#1   Report Post  
JMM
 
Posts: n/a
Default How to use IF

Hi,

I'm about to get gray hair here!

My problem goes like this:

I have three variables x1, x2 and x3. When this valiue is shown in CELL A1 I
need for the value in B1 to return 1, 2 og 3 and if no information in A1 I
need to have FALSE in B1.

Can someone help?

Thanks!
J




  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(A1="x1",1,IF(A1="x2",2,IF(A1="x3",3,IF(A1="",F ALSE,""))))

You didn't say what to do if none of these so I left it blank.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMM" wrote in message
...
Hi,

I'm about to get gray hair here!

My problem goes like this:

I have three variables x1, x2 and x3. When this valiue is shown in CELL A1

I
need for the value in B1 to return 1, 2 og 3 and if no information in A1 I
need to have FALSE in B1.

Can someone help?

Thanks!
J






  #3   Report Post  
jmm
 
Posts: n/a
Default

Hi Bob,

Thank you for your quick replay. The problem is that, this is exactly that I
wrote, but I still get the error... Is it because the value in A1 comes for
another sheet?

~J

"Bob Phillips" skrev:

=IF(A1="x1",1,IF(A1="x2",2,IF(A1="x3",3,IF(A1="",F ALSE,""))))

You didn't say what to do if none of these so I left it blank.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMM" wrote in message
...
Hi,

I'm about to get gray hair here!

My problem goes like this:

I have three variables x1, x2 and x3. When this valiue is shown in CELL A1

I
need for the value in B1 to return 1, 2 og 3 and if no information in A1 I
need to have FALSE in B1.

Can someone help?

Thanks!
J







  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

aah! you didn't say that :-)

If A1 is on another sheet, say "Data Sheet", then use

=IF('Data Sheet'!A1="x1",1,IF('Data Sheet'!A1="x2",2,IF('Data
Sheet'!A1="x3",3,IF('Data Sheet'!A1="",FALSE,""))))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"jmm" wrote in message
...
Hi Bob,

Thank you for your quick replay. The problem is that, this is exactly that

I
wrote, but I still get the error... Is it because the value in A1 comes

for
another sheet?

~J

"Bob Phillips" skrev:

=IF(A1="x1",1,IF(A1="x2",2,IF(A1="x3",3,IF(A1="",F ALSE,""))))

You didn't say what to do if none of these so I left it blank.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMM" wrote in message
...
Hi,

I'm about to get gray hair here!

My problem goes like this:

I have three variables x1, x2 and x3. When this valiue is shown in

CELL A1
I
need for the value in B1 to return 1, 2 og 3 and if no information in

A1 I
need to have FALSE in B1.

Can someone help?

Thanks!
J









  #5   Report Post  
JMM
 
Posts: n/a
Default

Argh! It still makes the same error!
This is what I write (It's in Danish):
=HVIS(Ordrebekræftelse!B10=C58,B58,HVIS(Ordrebekr æftelse!B10=C57,B57,HVIS(Ordrebekræftelse!B10=C5 6,B56,HVIS(Ordrebekræftelse!B10="",B59,""))))

Translated into English:
=IF(Ordre!B10=C58,B58,IF(Ordre!B10=C57,B57,IF(Ordr e!B10=C56,B56,HVIS(Ordre!B10="",B59,""))))

Can you see any error?

~J




"Bob Phillips" skrev:

aah! you didn't say that :-)

If A1 is on another sheet, say "Data Sheet", then use

=IF('Data Sheet'!A1="x1",1,IF('Data Sheet'!A1="x2",2,IF('Data
Sheet'!A1="x3",3,IF('Data Sheet'!A1="",FALSE,""))))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"jmm" wrote in message
...
Hi Bob,

Thank you for your quick replay. The problem is that, this is exactly that

I
wrote, but I still get the error... Is it because the value in A1 comes

for
another sheet?

~J

"Bob Phillips" skrev:

=IF(A1="x1",1,IF(A1="x2",2,IF(A1="x3",3,IF(A1="",F ALSE,""))))

You didn't say what to do if none of these so I left it blank.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMM" wrote in message
...
Hi,

I'm about to get gray hair here!

My problem goes like this:

I have three variables x1, x2 and x3. When this valiue is shown in

CELL A1
I
need for the value in B1 to return 1, 2 og 3 and if no information in

A1 I
need to have FALSE in B1.

Can someone help?

Thanks!
J












  #6   Report Post  
JulieD
 
Posts: n/a
Default

Hi JMM

what sheet is the B58 (etc on)
let's say you are going to make the first condition equal true what is
actually in cell B10 (on the Order Sheet?)
is it
C58
or a number like 1 which is also in C58

Cheers
JulieD


"JMM" wrote in message
...
Argh! It still makes the same error!
This is what I write (It's in Danish):
=HVIS(Ordrebekræftelse!B10=C58,B58,HVIS(Ordrebekræ ftelse!B10=C57,B57,HVIS(Ordrebekræftelse!B10=C56,B 56,HVIS(Ordrebekræftelse!B10="",B59,""))))

Translated into English:
=IF(Ordre!B10=C58,B58,IF(Ordre!B10=C57,B57,IF(Ordr e!B10=C56,B56,HVIS(Ordre!B10="",B59,""))))

Can you see any error?

~J




"Bob Phillips" skrev:

aah! you didn't say that :-)

If A1 is on another sheet, say "Data Sheet", then use

=IF('Data Sheet'!A1="x1",1,IF('Data Sheet'!A1="x2",2,IF('Data
Sheet'!A1="x3",3,IF('Data Sheet'!A1="",FALSE,""))))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"jmm" wrote in message
...
Hi Bob,

Thank you for your quick replay. The problem is that, this is exactly
that

I
wrote, but I still get the error... Is it because the value in A1 comes

for
another sheet?

~J

"Bob Phillips" skrev:

=IF(A1="x1",1,IF(A1="x2",2,IF(A1="x3",3,IF(A1="",F ALSE,""))))

You didn't say what to do if none of these so I left it blank.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JMM" wrote in message
...
Hi,

I'm about to get gray hair here!

My problem goes like this:

I have three variables x1, x2 and x3. When this valiue is shown in

CELL A1
I
need for the value in B1 to return 1, 2 og 3 and if no information
in

A1 I
need to have FALSE in B1.

Can someone help?

Thanks!
J












  #7   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

JMM wrote:
Argh! It still makes the same error!
This is what I write (It's in Danish):
=HVIS(Ordrebekræftelse!B10=C58,B58,HVIS(Ordrebekr æftelse!B10=C57,B57,HVIS(Ordrebekræftelse!B10=C5 6,B56,HVIS(Ordrebekræftelse!B10="",B59,""))))

Translated into English:
=IF(Ordre!B10=C58,B58,IF(Ordre!B10=C57,B57,IF(Ordr e!B10=C56,B56,HVIS(Ordre!B10="",B59,""))))

Can you see any error?

[...]

Whenever you seem to need a chain of (nested) IFs, investigate the
possibility of invoking a lookup formula instead. For example:

=IF(Ordre!B10="",B59,INDEX(B56:B58,MATCH(Order!B10 ,C56:C58,0))
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



All times are GMT +1. The time now is 02:04 AM.

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"