Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

If Formula Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ady - 06 Apr 2008 10:09 GMT
Hi There

I am struggling with what appears to be an easy formula. Here is what I am
trying to do:

If the values of cell vale of  B4 begins with either 20 or 30 then the
(B20*0.5)

Basically if a part number is for example 20-504 or 30-555 then we need to
give it 50% discount. We have many part numbers beginning with 20 or 30 that
need 50% discount.

Any help or advice offered will be most welcome. Many thanks in advance.

Signature

Kind Regards

Ady

Castell - 06 Apr 2008 10:22 GMT
Use the following:
=IF(OR(LEFT(B1,2)="20",LEFT(B1,2)="30"),C1*0.5,C1)

> Hi There
>
[quoted text clipped - 9 lines]
>
> Any help or advice offered will be most welcome. Many thanks in advance.
MartinW - 06 Apr 2008 10:36 GMT
Hi Ady,

Probably needs a bit of adjusting to suit your actual
data, but try something like this,
=IF(OR(LEFT(B4,2)*1=20,LEFT(B4,2)*1=30),B20*0.5,B20)

HTH
Martin

> Hi There
>
[quoted text clipped - 9 lines]
>
> Any help or advice offered will be most welcome. Many thanks in advance.
Ady - 06 Apr 2008 19:49 GMT
Hi There

Many thanks indeed to both of you. Not quite sure how this works, but it
does work very well!

Thank you again.

Kind regards

Ady

> Hi Ady,
>
[quoted text clipped - 18 lines]
>>
>> Any help or advice offered will be most welcome. Many thanks in advance.
Rick Rothstein (MVP - VB) - 06 Apr 2008 22:40 GMT
You can make that formula a little bit shorter...

=IF(OR(--LEFT(B4,2)={20,30}),B20*0.5,B20)

Rick

> Hi Ady,
>
[quoted text clipped - 18 lines]
>>
>> Any help or advice offered will be most welcome. Many thanks in advance.
Rick Rothstein (MVP - VB) - 06 Apr 2008 23:09 GMT
Actually, even a couple of characters shorter...

=IF(OR(LEFT(B4,2)={"20","30"}),B20/2,B20)

or, by changing the approach slightly, shorter still...

(of course, we are now changing the "approach")...

=B20-OR(LEFT(B4,2)={"20","30"})*B20/2

Rick

Rick

> You can make that formula a little bit shorter...
>
[quoted text clipped - 24 lines]
>>>
>>> Any help or advice offered will be most welcome. Many thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.