Hello friends,
I want to check TRx in column 2, if only TRx there then I want check column 1 value, whether that cell have “Aggregrate” word available or not.
For eg.
If My bot find “TRx” in G2, then bot will check in G1 for “Aggregrate” word available or not. If available then it will capture G3 value else it will check next column.
Can you be a little clear…because when you explained in words you spoke about two different columns…and when you gave the cell Values you are giving different rows instead of sifferent columns…
So the comparision be on rows or columns?
Can you explain in detail what is the requirement and what you want to acheive
I want to search TRx value in column2(B2), if its found then bot will check in column 1(B1) value whether “Aggregate” word contains or not, if yes then it will capture B3 value otherwise it do same thing to the next column.
First of all B1,B2 and B3 belongs to same column…not different column…they belong to different rows…do you mean if B2 matches then check A2 for Aggregate and then check C2 value other wise move to next row…is this correct?
if yes…
then follow the steps
Read the data into a datatable
Use for each row in datatable
Use a if condition with currentrow(1).ToString.Contains("TRx")
on the then side use one more if condition with currentrow(0).ToString.Contains("Aggregate")
On then side of second if you can get Currentrow(2).ToString…On the else side no match found
In Microsoft Excel, you can use the INDEX and MATCH functions to find the top row’s respective values based on row 2’s value. The steps are as follows:
Choose a cell in which to display the result.
Fill in the blanks with the following formula: =INDEX(top row range, MATCH(row 2 value, bottom row range, 0))
Replace “top row range” with the range of cells in the top row where you want to find the value.
Replace “row 2 value” with the cell reference of the value in row 2 that you want to match.
Substitute “range of row 2” for the range of cells in row 2 containing the value you want to match.
My requirement is simple bro, I am going to elaborate it again.
Requirements:-
Bot should read A2 cell value, if only TRx word available then it will check “Aggregate” word in A1 cell. if that “Aggregate” word not found then it will capture A3 value. Bot should run/check A2 to M2 and check all above conditions.
This is the requirement.
Please try to understand the query and help.