Quality Testing

Quality is delighting customers

if excel sheet contains data like a ,a in first row and a ,b  in 2nd row then if data is same we have to write pass otherwise we have to write fail in 3rd row can any one help 

Tags: 2nd, a, b, contains, data, excel, fail, failif, first, have, More…if, in, is, like, otherwise, pass, row, same, sheet, then, to, we, write

Views: 156

Reply to This

Replies to This Discussion

Change the path of excel sheet in vbs file  .

Change the data in first and second row . Execute vbs file .

Result is stored in 3 rd row .  

Attachments:

set a=createobject("excel.application")

set b=a.workbooks.open("excel.xls")

set c=b.worksheets("sheet1")

r=c.usedrange.rowscount

c=c.usedrange.columnscount

for i=1 to r

if c.cells(i,j)=c.cells(I+1,j) then

c.cells(i,3)="pass"

else

c.cells(3,j)="fail"

j+1

end

set a=nothing

set b=nothing

set c=nothing

try it

I am not sure if I understood your question :)

try following in the third column/row

Assuming that you have data in Column A and B

=IF(A1=B1, "Pass","Fail")

I think srinivas is corect!!

RSS

TTWT Magazine

Welcome to Quality Testing!

Keith Klain

 Director - Head of Global Test Center at Barclays

Advertisement

Submit A Job

Submit A Tool

Advertisement

Videos

  • Add Videos
  • View All

Badge

Loading…

© 2013   Created by Quality Testing.

Badges  |  Report an Issue  |  Terms of Service