View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John C[_2_] John C[_2_] is offline
external usenet poster
 
Posts: 1,358
Default Logical if more than 7

With only 1 IF Statement. Further clarification on what is A or B in the
formula if B2="HR".

=(B2="HR")*(8*A+2*B)+SUM(C2:E2)*IF(B2="ST",2,OR(B2 ={"BB","TB","S","SB","Z","SCB1","SCB2"}))


--
John C


"vmohan1978" wrote:

A B C D
E F

1 shape of bar a b c formula required
2 BB
3 TB
4 S
5 L
6 SB
7 Z
8 ST
9 CH
10 SCB1
11 SCB2
12 HR


I WANT THE FORMULA IN F2 IF B2=BB OR TB OR S OR SB OR Z OR SCB1 OR SCB2
THEN F2= C2+D2+E2 THEN , IF B2=ST THEN F2=2*( C2+D2+E2) ,IF B2=TB THEN
C2+D2+E2, IF B2=HR THEN F2= 8*A+2*B.
PLEASE DO THE NEEDFUL.