Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default complex if statement

column B contains a value of either "F" or "H" or blank
column C contains a value of either "A" or B" or blank
columns D-G contain various numeric values

In column A here is what I want to be returned:

if column B="F" return the value of 20; if column B="H" return the value of
10; if column B is blank, add together the values in columns D-G

AND

if column C="A" return the value of 20; if column C="B"= return the value of
10; if colum C is blank, add together the values in columns D-G (and column B)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default complex if statement

Since you havent mentioned about data in both Columns B and C; I assume you
will have either colB or ColC will have data...Try the below formula in Cell
A1 and copy down as required

(all in one line)
=IF(OR(B1&C1="F",B1&C1="A"),20,
IF(OR(B1&C1="H",B1&C1="B"),10,SUM(D1:G1)))

If this post helps click Yes
---------------
Jacob Skaria


"kdel1201" wrote:

column B contains a value of either "F" or "H" or blank
column C contains a value of either "A" or B" or blank
columns D-G contain various numeric values

In column A here is what I want to be returned:

if column B="F" return the value of 20; if column B="H" return the value of
10; if column B is blank, add together the values in columns D-G

AND

if column C="A" return the value of 20; if column C="B"= return the value of
10; if colum C is blank, add together the values in columns D-G (and column B)

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
Complex IF Statement Jonni Excel Discussion (Misc queries) 7 June 26th 09 04:09 PM
Complex IF THEN statement Greg S Excel Worksheet Functions 5 December 8th 08 11:40 PM
Complex IF STATEMENT CR3 Excel Discussion (Misc queries) 3 December 6th 07 12:32 PM
Help with complex If statement GHawkins[_2_] Excel Worksheet Functions 2 September 6th 07 10:16 PM
complex IF(OR(...AND())) statement Dave F Excel Discussion (Misc queries) 2 October 4th 06 06:24 PM


All times are GMT +1. The time now is 04:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"