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.
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.