Calc Macro that replaces a cell value, if a search string is found in another cell

asked 2016-12-20 14:39:31 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi everyone,

If a string "xyz" is found in a cell in F column, I would like to set a macro that would search the entire document, replacing the cell in G column in the same row, with a value from a cell underneath it.

Any help would be appreciated...

Example given: F1 Cell: xyz, G1 Cell: 123 F2 Cell: anything, G2 Cell: 456

The result: F1 Cell: xyz, F2 Cell: 456 F2 and G2 remain the same

Thanks and have a great day!

edit retag flag offensive close merge delete


Do you mean "G1 Cell: 456" (not F2, but G1)? In other worsd - G1=G2=456?

JohnSUN gravatar imageJohnSUN ( 2016-12-20 16:02:28 +0200 )edit