This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can someone suggest any python script or any script so that I can make modification in my excel sheets or text file ?

Like I have four columns in excel A,B,C,&D. The elements in D says Yes or No. If we make any code like it detect Yes in D column will automatically transform or interchange element in C to D without disturbing the No column elements. I have to change all yes elements in D like as described above. Please help me to do that!

code python

This is trivial to do in Excel. Generally speaking, python scripts are not the best choice when it comes to manipulating Excel files, even though it can be done.

By the way, how is this related to bioinformatics?

Thanks for the info. I have gfff3 file where the gene position (start and end) was incorrectly placed for some genes I want to make it correct using excel or as text file if condition met. I am reading about swap function in excel but was not able to do now ? I am trying though!

I have done it using macros thanks for all the suggestions.

1 answer

No one wants to do your homework. Show what you tried, and someone might be able to give you a quick tweak that would work.

Honestly, I bet you could do this in Excel with an 'if' formula.

Honestly, I am trying but not able to do that, information in cell B and C are large. If you know in excel if statement please suggest.

B C D 12 14 Yes # If yes then change B to 14 and then C value to 12.

I have done it using macros thanks for all the suggestions.

Log in to answer this question.