Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Wildcards in formulae

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Wildcards in formulae

=IF(LEFT(A1,3)="LDN",A1,"LDN" &A1)

"Chiccada" wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,510
Default Wildcards in formulae

If it is always 3 characters on the left that you are looking for then use
the LEFT function as per the following:-

=IF(LEFT(A1,3)<"LDN","LDN"&A1,A1)

Note: The ambersand (&) can be used in lieu of the concatenate function and
is easier.

Regards,

OssieMac

"Chiccada" wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Wildcards in formulae

Thanks chaps.

As a follow up, if the LDN bit was anywhere in the cell, not just on the
left, how would the formula work then?

"OssieMac" wrote:

If it is always 3 characters on the left that you are looking for then use
the LEFT function as per the following:-

=IF(LEFT(A1,3)<"LDN","LDN"&A1,A1)

Note: The ambersand (&) can be used in lieu of the concatenate function and
is easier.

Regards,

OssieMac

"Chiccada" wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Wildcards in formulae

If LDN wasn't at the beginning, what result would you want?

e.g 123LDN456 , how would it appear in the non-LDN string 987654?

"Chiccada" wrote:

Thanks chaps.

As a follow up, if the LDN bit was anywhere in the cell, not just on the
left, how would the formula work then?

"OssieMac" wrote:

If it is always 3 characters on the left that you are looking for then use
the LEFT function as per the following:-

=IF(LEFT(A1,3)<"LDN","LDN"&A1,A1)

Note: The ambersand (&) can be used in lieu of the concatenate function and
is easier.

Regards,

OssieMac

"Chiccada" wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Wildcards in formulae

=IF(ISNUMBER(FIND("LDN",A1)),A1,"LDN" &A1)

This will check if LDN exists: if NOT, it still adds to the front of the
invoice number.

"Toppers" wrote:

If LDN wasn't at the beginning, what result would you want?

e.g 123LDN456 , how would it appear in the non-LDN string 987654?

"Chiccada" wrote:

Thanks chaps.

As a follow up, if the LDN bit was anywhere in the cell, not just on the
left, how would the formula work then?

"OssieMac" wrote:

If it is always 3 characters on the left that you are looking for then use
the LEFT function as per the following:-

=IF(LEFT(A1,3)<"LDN","LDN"&A1,A1)

Note: The ambersand (&) can be used in lieu of the concatenate function and
is easier.

Regards,

OssieMac

"Chiccada" wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Wildcards in formulae

Thanks for that, it was more of an afterthought question, not related to my
inital query.

"Toppers" wrote:

=IF(ISNUMBER(FIND("LDN",A1)),A1,"LDN" &A1)

This will check if LDN exists: if NOT, it still adds to the front of the
invoice number.

"Toppers" wrote:

If LDN wasn't at the beginning, what result would you want?

e.g 123LDN456 , how would it appear in the non-LDN string 987654?

"Chiccada" wrote:

Thanks chaps.

As a follow up, if the LDN bit was anywhere in the cell, not just on the
left, how would the formula work then?

"OssieMac" wrote:

If it is always 3 characters on the left that you are looking for then use
the LEFT function as per the following:-

=IF(LEFT(A1,3)<"LDN","LDN"&A1,A1)

Note: The ambersand (&) can be used in lieu of the concatenate function and
is easier.

Regards,

OssieMac

"Chiccada" wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Wildcards in formulae

And if you wanted to really use wild cards...

Starts with LDN
=if(countif(a1,"LDN*")0, ....

or ends with LDN
=if(countif(a1,"*LDN")0, ....

or contains LDN
=if(countif(a1,"*LDN*")0, ....

Chiccada wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Wildcards in formulae

="LDN"&SUBSTITUTE(A1,"LDN","")


"Chiccada" wrote:

Hello,

Im wondering if its possible for formulae to contain wild cards.

e.g.

i have a list of invoice numbers, some have LDN at the start some dont. What
i would like to do is make an IF formula which will find the invoices that
dont have LDN at the start. i was hoping that
'=if(a1=LDN*,a1,concatenate("LDN",a1))' would work but needless to say it
doesnt.

What, if anything replaces that * so i can search for part entires in cells?

Many thanks,

Rikki

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
use of wildcards italiavb Excel Worksheet Functions 5 July 14th 06 05:48 AM
Wildcards in RTD JKC Excel Discussion (Misc queries) 0 February 3rd 06 07:35 PM
wildcards in vba shellshock Excel Discussion (Misc queries) 3 July 21st 05 07:37 PM
Searching TEXT in formulae, rather than results of formulae AndyE Excel Worksheet Functions 1 July 15th 05 10:57 AM
VBA Wildcards - HELP! Co-op Bank Charts and Charting in Excel 1 March 30th 05 02:37 PM


All times are GMT +1. The time now is 09:36 AM.

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"