Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6018131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:13:51+00:00 2026-05-23T03:13:51+00:00

I have an excel sheet with 2 columns: absolute path and relative path. Now

  • 0

I have an excel sheet with 2 columns: absolute path and relative path.
Now say the data is in below format:

 absolute path           relative path
 -------------           -------------
 /a/b/c/d/abc.dat                
 /x/y/z/def.dat
 /p/q/r/s/t/test.dat
 /a/b/c/d/abc.dat                
 /x/y/z/def.dat

The output should be

 absolute path           relative path
 -------------           -------------
 /a/b/c/d/abc.dat        ABCD_PATH       
 /x/y/z/def.dat          XYZ_PATH   
 /p/q/r/s/t/test.dat     PQRST_PATH
 /a/b/c/d/abc.dat        ABCD_PATH       
 /x/y/z/def.dat          XYZ_PATH
  • If the 1st column contains /a/b/c/d, then in the 2nd column it should place some unique string which I give here as ABCD_PATH.

  • If the 1st column contains /x/y/z/, then in the 2nd column it should place some unique string which I give here as XYZ_PATH.

  • If the 1st column contains /p/q/r/s/t/, then in the 2nd column it should place some unique string which I give here as PQRST_PATH.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:13:52+00:00Added an answer on May 23, 2026 at 3:13 am
    1. Create a mapping table in a sheet in your excel file (sheet2 for example):

       ______________________________________
      |   |    A       |      B
      |___|____________|_____________________
      | 1 | Absolute   |   ReplaceBy
      |   |------------|---------------------
      | 2 |/a/b/c/d/   |   ABCD_PATH
      | 3 |/x/y/z/     |   XYZ_PATH
      | 4 |/p/q/r/s/t/ |   PQRST_PATH
      |
      |_________          ___________________
      \ sheet1 /\ sheet2 /\ sheet3 /
       \______/  \______/  \______/
      
    2. Back to sheet1:

       ___________________________________________________
      |   |    A               |      B
      |___|____________________|__________________________
      | 1 | absolute path      |   relative path
      |   |--------------------|--------------------------
      | 2 |/a/b/c/d/abc.dat    |   =VLOOKUP(LEFT(A2...    --(hit)-> Ctrl+Shift+Enter
      | 3 |/x/y/z/def.dat      |           |
      | 4 |/p/q/r/s/t/test.dat |           V (copy cell)
      |
      |         __________________________________________
      \ sheet1 /\ sheet2 /\ sheet3 /
       \______/  \______/  \______/
      
    3. Put in relative path B2 cell this formula:

      =VLOOKUP(LEFT(A2,
                    MAX((MID(A2, ROW($1:$90), 1)="/")*ROW($1:$90))
                   ),
               Sheet2!$A$2:$B$4,
               2,
               FALSE)
      
    4. Hit Ctrl+Shift+Enter : it’s an array formula, also known as a CSE formula.

    5. Copy B2 cell (not the formula) and paste it in the remaining cells in column B.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of columns of data in an excel sheet which I
I've created an excel sheet with Delphi 6. Now I have to add a
I have a Excel sheet with two columns and I need to create new
I have an excel sheet with values in columns A, B and C like
I currently have an excel sheet with one of the columns being in the
I have few columns in an excel sheet for which I need to do
I have a excel sheet contains three columns Name, Email ID and Contact No.
I have a excel sheet with 2 columns Contact Status Max Probability 80-Opp Closed
I have an excel sheet with two columns of interest Year and Donations. The
I have an array of arrays of data. so the basic format is $sheet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.