Excel help?
Author
Discussion

audi321

Original Poster:

6,192 posts

244 months

Tuesday 25th June 2019
quotequote all
Hi all, if I wanted to do an IF statement so that if a cell contains a certain word, it would then cut the entire row into another sheet, is this possible?

Thanks in advance!

louiebaby

11,011 posts

222 months

Tuesday 25th June 2019
quotequote all
That's sounding like a VBA solution will be required to me...

phil4

1,657 posts

269 months

Tuesday 25th June 2019
quotequote all
As above, if you're tying to do trigger/action type stuff, then a VBA would be better.

If not, you could in the destination cell put the formula along the lines: If triggercell = "word" then this cell = source cell.... something like this =IF(Sheet1!A1= "test2",Sheet1!A2,"")

Clearly you'd need to ripple that along, but that should do as you want.

paulrockliffe

16,654 posts

258 months

Tuesday 25th June 2019
quotequote all
VBA or you're looking at creating a dynamic table either with VLOOKUPY type stuff or as a Pivot Table. Whether the later works depends on what you're doing with the second table.

Format your table as a table, use it as the basis for your Pivot Table, draw the table you want and add the right filter. Set it to update itself when you open the workbook. Remember you'll need to update it manually if you change your source data.