![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 752
|
This has to do with my earlier post which Al helped me with but I have one small problem.
The macro looks for a cell with only the word Total in it, my problem is that Total is the last word in the following options. City Total State Total Zip Code Total How would I change the command below to select any of the 3 words which all contain the word Total? If (cell.Value) = "Total" Then Thanks |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Use:
If right(cell.Value,5) = "Total" Then _________________ Hope this helps. Kind regards, Al. [ This Message was edited by: Al Chara on 2002-04-17 15:37 ] |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
=right(CellName,5) to pick up Total that consists of 5 characters in the extreme right location in that cell! |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Sorry, Al:
I did not see your post ... mine probably went in right after yours! |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 752
|
Yeah! Thats exactly what I needed it to do.
Al, Thanks a lot |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|