Latif
August 25, 2020, 8:31pm
1
How can i match a word from variable…
var Filename = UserID-02-CaseID-004-Maximum.xlsx
var Project = Maximum
Matching word is = Maximum
I want to match the word Maximum of those 2 varible to the Excel row value in a IF statement…
can someone help…
To Chevk whether a string contains this word or substring
Using stringvar.Contains(varaible)
Use this in if condition
Hope it helps
Mark it as solution if you got it
Nived N
Happy Automation
1 Like
Dave
(David Wiebelhaus)
August 25, 2020, 10:03pm
3
If Filename.Contains(“Maximum”) AndAlso Project.Contains(“Maximum”)
keep in mind that the .Contains() method is case sensitive. If you want to capture regardless of capitalization you can convert everything to upper/lower e.g. Filename.ToUpper.Contains(“MAXIMUM”)
1 Like
Latif
August 26, 2020, 7:34am
4
Thanks its worked… just need little more help is this
Project variable comes with = Maximumlist
So i need to cut this “list” as its not in the parh… how to trim that or cut that…
And i need first letter to not be capitle… means by,
Project have M capitel as Maxium… and Path have not M capitel… so i need to lover that letter…
Latif
August 26, 2020, 9:49am
5
Thanks for the help @Dave I have solved rest of the issue…
Its working now…
system
(system)
Closed
August 29, 2020, 9:49am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.