compare csvs and update value in one of them

Welcome Forums General PowerShell Q&A compare csvs and update value in one of them

Viewing 1 reply thread
  • Author
    • #229822
      Topics: 1
      Replies: 0
      Points: 12
      Rank: Member

      I have three csvs. CSV1 has the all the usernames I need to find “info” for. Half the usernames are in CSV2 and HALF in CSV3.

      I need to cycle through the usernames found in CSV1 and compare to usernames CSV2 and CSV3 and update “info” in CSV1 if the username is found in either CSV2 or CSV3.

      username, info
      bob, <is currently blank>
      dirk, <is currently blank>
      john, <is currently blank>
      jill, <is currently blank>



      I’m sure this is easy, I’m just having difficulty wrapping my head around it today. Any help is appreciated, still learning.

      • This topic was modified 4 months ago by twinsd30.
    • #229831
      Topics: 13
      Replies: 1758
      Points: 3,153
      Helping Hand
      Rank: Community Hero

      twinsd30, welcome to Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.

      When you post code, error messages, sample data or console output format it as code, please.
      In the “Text” view you can use the code tags “PRE“, in the “Visual” view you can use the format template “Preformatted“. You can go back edit your post and fix the formatting – you don’t have to create a new one.
      Thanks in advance.

      This a common question in the forums, look at this:

      Merge 2 large arrays based on a single matching property into new PsObject array

Viewing 1 reply thread
  • The topic ‘compare csvs and update value in one of them’ is closed to new replies.