If/Then with search within string

VermontFarm

New Member
Joined
Dec 11, 2015
Messages
2
I want to embed an ‘isnumber’ within if/then statement to place the dollar value of a column into another column. Even though I can see the two characters I am looking for (VT), the formula continues to come up as “FALSE”, and I suspect it is because of the format of the cell that contains the text. Has anyone out there had the same trouble?

VERMONT DMV SERVIC 802-229-4171 VT 05602 US

<colgroup><col><col><col></colgroup><tbody>
</tbody>
70.00

<tbody>
</tbody>

I’m trying to pull all charges done within a specific state into another column so I can total those sales and verify sales tax charges.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
try this

Code:
=IF(ISNUMBER(SEARCH("VT",B13)),C13,0)

adjust ranges and cell references to suit
 
Upvote 0
try this

Code:
=IF(ISNUMBER(SEARCH("VT",B13)),C13,0)

adjust ranges and cell references to suit
This isn’t working; the result for “False” is showing up as a zero, but when the result is “True”, the result also shows up as a zero.​
 
Upvote 0
This isn’t working; the result for “False” is showing up as a zero, but when the result is “True”, the result also shows up as a zero.​

hmm it works for me. I entered your text into cell B13 and the value to C13

I entered the formula into e13

with the same text dragged and dropped to b17 and the values incremented by 10 from c14 - c17 (except c17 was change to -50)
cell b16 text change to VERMONT DMV SERVIC 802-229-4171 DT 05602 US to create a false return.

that is what I did and the formula works.

can you provide more info on your text string?

did you change the formula so that ranges or cell references are point to the correct cells in your data?
 
Last edited:
Upvote 0
This isn’t working; the result for “False” is showing up as a zero, but when the result is “True”, the result also shows up as a zero.​
I can confirm that RCBricker's formula works so you must either be doing something wrong or the way the value of the cell containing VT is obtained is causing the issue. Have you made sure to adjust the cell references if needed?
 
Upvote 0

Forum statistics

Threads
1,215,433
Messages
6,124,863
Members
449,195
Latest member
MoonDancer

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