Forum Discussion

hectordsv's avatar
hectordsv
Copper Contributor
Aug 27, 2025

Need Formula to Pull Specific Data

I am attempting to pull data from one sheet into another if certain key words are met. The data is static but I just need it to read data entered in one column and pull the related CTN. I've attached a spreadsheet for reference. For example, on the "Main tab", I enter AKL, SYD, BAH into the WCO column and I want the CTN column to read the WCO column and pull the correct CTN from the "CTN tab" by reading the table of information.

5 Replies

  • hectordsv's avatar
    hectordsv
    Copper Contributor

    https://docs.google.com/spreadsheets/d/1UX48Qu_Y8B5WP7UKOp0d0z7LBcpFy37-/edit?usp=sharing&ouid=103744200735667771049&rtpof=true&sd=true

    • HansVogelaar's avatar
      HansVogelaar
      MVP

      Thank you!

      In C2 on the Main sheet:

      =XLOOKUP(B2, CTN!$B$2:$B$27, CTN!$A$2:$A$27, "")

      Fill down.

      Alternatively, use

      =XLOOKUP(B2:B4, CTN!B2:B27, CTN!A2:A27, "")

      This will spill to C2:C4.

       

  • hectordsv's avatar
    hectordsv
    Copper Contributor

    https://docs.google.com/spreadsheets/d/1UX48Qu_Y8B5WP7UKOp0d0z7LBcpFy37-/edit?pli=1&gid=1564476810#gid=1564476810

  • If you cannot attach a workbook: you could make it available through one of the websites that let you upload and share a file, such as OneDrive, Google Drive, FileDropper or DropBox. Then post a link to the uploaded and shared file in a reply.

Resources