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

I have cells that contain an alpha character followed by 2 astrisks (i.e.
A**, B**, ...). I also have cells that have an alpha character followed by 2
numbers (A09, C08, ...). I would like to do an if statement to find and
replace the cells with the alpha character and 2 astrisks (i.e. A**, B**,
....) and change them to the alpha character followed by the word total (A
Total). I have tried the following if statements but neither is returning
the correct result. Any suggestions?

=IF(A21="*~*~*","* Total",A21)
=IF(A21="?~*~*","* Total",A21)



--
AJ
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Wildcards in If statements

Try this:

=SUBSTITUTE(A1,"**","Total")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"AJ" wrote in message
...
I have cells that contain an alpha character followed by 2 astrisks (i.e.
A**, B**, ...). I also have cells that have an alpha character followed

by 2
numbers (A09, C08, ...). I would like to do an if statement to find and
replace the cells with the alpha character and 2 astrisks (i.e. A**, B**,
...) and change them to the alpha character followed by the word total (A
Total). I have tried the following if statements but neither is returning
the correct result. Any suggestions?

=IF(A21="*~*~*","* Total",A21)
=IF(A21="?~*~*","* Total",A21)



--
AJ


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Wildcards in If statements

You can do this in place if you want.

Select the range of data in question
Goto the menu EditReplace
Find what: ~**
Replace with: <hit the spacebar total
Replace All

--
Biff
Microsoft Excel MVP


"AJ" wrote in message
...
I have cells that contain an alpha character followed by 2 astrisks (i.e.
A**, B**, ...). I also have cells that have an alpha character followed
by 2
numbers (A09, C08, ...). I would like to do an if statement to find and
replace the cells with the alpha character and 2 astrisks (i.e. A**, B**,
...) and change them to the alpha character followed by the word total (A
Total). I have tried the following if statements but neither is returning
the correct result. Any suggestions?

=IF(A21="*~*~*","* Total",A21)
=IF(A21="?~*~*","* Total",A21)



--
AJ



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Wildcards in If statements

That worked! Thanks.
--
AJ


"Ragdyer" wrote:

Try this:

=SUBSTITUTE(A1,"**","Total")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"AJ" wrote in message
...
I have cells that contain an alpha character followed by 2 astrisks (i.e.
A**, B**, ...). I also have cells that have an alpha character followed

by 2
numbers (A09, C08, ...). I would like to do an if statement to find and
replace the cells with the alpha character and 2 astrisks (i.e. A**, B**,
...) and change them to the alpha character followed by the word total (A
Total). I have tried the following if statements but neither is returning
the correct result. Any suggestions?

=IF(A21="*~*~*","* Total",A21)
=IF(A21="?~*~*","* Total",A21)



--
AJ



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Wildcards in If statements

You're welcome, and appreciate the feed-back.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"AJ" wrote in message
...
That worked! Thanks.
--
AJ


"Ragdyer" wrote:

Try this:

=SUBSTITUTE(A1,"**","Total")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"AJ" wrote in message
...
I have cells that contain an alpha character followed by 2 astrisks
(i.e.
A**, B**, ...). I also have cells that have an alpha character followed

by 2
numbers (A09, C08, ...). I would like to do an if statement to find and
replace the cells with the alpha character and 2 astrisks (i.e. A**,
B**,
...) and change them to the alpha character followed by the word total
(A
Total). I have tried the following if statements but neither is
returning
the correct result. Any suggestions?

=IF(A21="*~*~*","* Total",A21)
=IF(A21="?~*~*","* Total",A21)



--
AJ





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
Wildcards in RTD JKC Excel Discussion (Misc queries) 0 February 3rd 06 07:35 PM
Wildcards irresistible007 Excel Worksheet Functions 2 December 20th 05 10:12 AM
Use wildcards furia Excel Discussion (Misc queries) 0 November 16th 05 06:23 PM
wildcards in vba shellshock Excel Discussion (Misc queries) 3 July 21st 05 07:37 PM
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 07:37 PM.

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

About Us

"It's about Microsoft Excel"