Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Whats better Lookup or Function Formula

Im am trying to calculate the following. What is the best way to do it.

if C2 < C1 (value of prev row same col)
and if D2="O" or "B" then F2= 1 (numeric result)

else if C2 = C1 (value of prev row same col)
and if D2="B" then F2= 2 (numeric result)
or if D2="S" then F2= 3 (numeric result)
or if D2="X" then F2= 4 (numeric result)
else "Error"

How would I write the formula??
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Whats better Lookup or Function Formula

=IF(C2<C1,IF(D2="O",1,"what in this
case??"),IF(D2="B",2,IF(D2="S",3,IF(D2="X",4,"Erro r!!"))))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Jocko_MacDuff116" wrote in
message ...
Im am trying to calculate the following. What is the best way to do it.

if C2 < C1 (value of prev row same col)
and if D2="O" or "B" then F2= 1 (numeric result)

else if C2 = C1 (value of prev row same col)
and if D2="B" then F2= 2 (numeric result)
or if D2="S" then F2= 3 (numeric result)
or if D2="X" then F2= 4 (numeric result)
else "Error"

How would I write the formula??



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Whats better Lookup or Function Formula

One way:

F2: =IF(C2<C1, IF(OR(D2="O", D2="B"), 1, "Error"), IF(D2="B", 2,
IF(D2="S", 3, IF(D2="X", 4, "Error"))))






In article ,
Jocko_MacDuff116 wrote:

Im am trying to calculate the following. What is the best way to do it.

if C2 < C1 (value of prev row same col)
and if D2="O" or "B" then F2= 1 (numeric result)

else if C2 = C1 (value of prev row same col)
and if D2="B" then F2= 2 (numeric result)
or if D2="S" then F2= 3 (numeric result)
or if D2="X" then F2= 4 (numeric result)
else "Error"

How would I write the formula??

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Whats better Lookup or Function Formula

=IF(AND(C2<C1,OR(D2={"O","B"})),1,IF(C2=C1,IF(D2= "B",2,IF(D2="S",3,IF(D2="X",4,"Error"))),"Erro r"))


"Jocko_MacDuff116" wrote:

Im am trying to calculate the following. What is the best way to do it.

if C2 < C1 (value of prev row same col)
and if D2="O" or "B" then F2= 1 (numeric result)

else if C2 = C1 (value of prev row same col)
and if D2="B" then F2= 2 (numeric result)
or if D2="S" then F2= 3 (numeric result)
or if D2="X" then F2= 4 (numeric result)
else "Error"

How would I write the formula??

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel SUM function - can it be limited to whats in parentheses? liillith Excel Discussion (Misc queries) 2 January 5th 07 06:31 PM
Whats wrong with this OR formula? Mark Excel Worksheet Functions 4 October 23rd 06 07:16 PM
whats wrong with the formula? Gary Excel Worksheet Functions 2 August 3rd 06 11:33 AM
WHATS AN EASY FUNCTION TO USE TO ROUND TO THE NEAREST THOUSAND? Martina Excel Worksheet Functions 4 January 9th 05 01:35 PM
Whats the function to count the total times a word is displayed Monk Excel Discussion (Misc queries) 3 December 10th 04 10:39 PM


All times are GMT +1. The time now is 09:12 PM.

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"