LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ina ina is offline
external usenet poster
 
Posts: 120
Default if statement problem

Hello all,

I have a problem he

For each cell in my range I would like to look for this words:
Some value has the word EUR and others USD.

If (Intstr = Application.WorksheetFunction.Search("USD",
MyCell.Value)) Then
ActiveCell.Offset(0, 2).Value = Mid(MyCell.Value, 1, Intstr
- 1)

ElseIf (Intstr = Application.WorksheetFunction.Search("EUR",
MyCell.Value)) Then
ActiveCell.Offset(0, 2).Value = Mid(MyCell.Value, 1, Intstr
- 1)

End If

I have an error here because it executes the two if and the same time.


Thanks,

Ina

 
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
IF Statement Problem SixBowls Excel Discussion (Misc queries) 4 December 11th 09 05:33 PM
If statement problem Scott@CW Excel Discussion (Misc queries) 1 April 26th 07 03:40 PM
IF STATEMENT PROBLEM Manjit Gosal Excel Worksheet Functions 4 November 10th 05 05:40 PM
IF Statement problem trixma New Users to Excel 3 September 27th 05 06:36 AM
If Statement Problem TB via OfficeKB.com Excel Worksheet Functions 2 June 29th 05 10:03 PM


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

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"