#1   Report Post  
Old August 29th 17, 08:47 AM
Junior Member
 
First recorded activity by ExcelBanter: Aug 2017
Posts: 2
Default If with or

am trying to create an equation using If and or and am stuck I can someone assist me


for example I have the following values

11223300
44556600
66778800
99999900
77777700

I want to say if the first 6 digits in ( A1) equals to 112233 , 445566, 667788 then give the value of A , and if the first 6 digits in (A1) equals to 999999 then give the value of B, if neither then give the value of C

I tried to combined equations but I got stuck

  #2   Report Post  
Old August 29th 17, 09:16 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,693
Default If with or

Hi,

Am Tue, 29 Aug 2017 08:47:35 +0100 schrieb jnasser:

for example I have the following values

11223300
44556600
66778800
99999900
77777700

I want to say if the first 6 digits in ( A1) equals to 112233 , 445566,
667788 then give the value of A , and if the first 6 digits in (A1)
equals to 999999 then give the value of B, if neither then give the
value of C


try:
=IF(OR(--LEFT(A1,6)={112233,445566,667788}),A1,IF(--LEFT(A1,6)=999999,B1,C1))
or:
=IF(COUNT(FIND({112233,445566,667788},A1))0,A1,IF (--(LEFT(A1,6))=999999,B1,C1))


Regards
Claus B.
--
Windows10
Office 2016
  #3   Report Post  
Old August 29th 17, 10:26 AM
Junior Member
 
First recorded activity by ExcelBanter: Aug 2017
Posts: 2
Default

thanks the first equation worked perfectly


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 03:07 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017