I'm looking for a way to filter values based on another column but keep them in the same rows they came from. Here's an example I created manually of the correct output: enter image description here

The goal here is to have a formula (or maybe 3 separate filter formulas) such that the constants can be sorted based on sample number but retain the original rows they came from so that they keep their associated dates. I figure I can use something like =FILTER(B2:B,C2:C="Sample1") to fill in column G, but that doesn't retain the rows properly.

Any help is appreciated!

1 Answer 1




We are essentially saying: if C2:C is equal to "Sample1" return the corresponding value in B2:B, otherwise, leave the cell blank.

  • Could have sworn I tried something very similar to this before, maybe I just had my columns mixed up. Anyway, thanks a ton! This works exactly the way I needed it to.
    – Sp3ctral
    Commented May 19, 2022 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.