Find Cell

Parra

Well-known Member
Joined
Feb 21, 2002
Messages
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
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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
 
Upvote 0
On 2002-04-17 15:32, Parra wrote:
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

You could use the lookup value to be

=right(CellName,5) to pick up Total that consists of 5 characters in the extreme right location in that cell!
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,923
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top