SOLVED

Conditional import from txt or csv to Excel

Copper Contributor

Hello, so, I need to import data from a .txt file (might as well be a .csv) that contains: "Initial date", "Final date", "Group".

In my Excel sheet I have empty date cells that must that must be written with the dates contained in the .txt file and it only must be written if the Group matches in both ends.

I tried importing them using the data importing tool, but I couldn't find a way to make it conditional.

Any ideias on how I could solve this problem?

 

5 Replies
the Group matches in both ends.
after import to Excel,have you tried xlook formula?

@peiyezhu no, I haven't tried it, but I'll look forward to it, thank you.

I've tried the formula, unfortunately it wasn't enough to solve my problem. I'm still looking forward to it yet.
import data from a .txt file (might as well be a .csv)

can you share your file here?

maybe another solution available
best response confirmed by brezendelima (Copper Contributor)
Solution
Sounds like Power Query works:
(1) Goto Tab Data->Get Data->From File->From Text/CSV
(2) Select source file t-> "Transform Data" -> PowerQuery Editor
(3) Transform the data, e.g. "Use First Row as Headers" -> Add "Conditional Column"
(4) Edit condition, Filter By Contional Value, Apply & Close

1 best response

Accepted Solutions
best response confirmed by brezendelima (Copper Contributor)
Solution
Sounds like Power Query works:
(1) Goto Tab Data->Get Data->From File->From Text/CSV
(2) Select source file t-> "Transform Data" -> PowerQuery Editor
(3) Transform the data, e.g. "Use First Row as Headers" -> Add "Conditional Column"
(4) Edit condition, Filter By Contional Value, Apply & Close

View solution in original post