Locate Cell and enter corresponding value into new cell

noclue2000

New Member
Joined
Oct 30, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi All,

My request may be simple but I cannot work it out.

I'll start by explaining that Column B and C were copied and pasted from a different Excel sheet and are not part of the original document. My basic issue is that the original document does not contain the Invoice number relating to the ticketing number. Therefore, as per the attached image. I want to locate the value in Column B (Ticket Number) within Column A (Additional Information). You will notice Column A 'Ticket Number' listed but it has 081 as the first 3 digits followed by the rest of the number as seen in Column B. This means when searching, for the values from Column B in Column A, it is not an exact match but a simple Ctrl+F works fine. I then need the corresponding (Existing Invoice No) from Column C to be entered into Column D (Invoice Number) on the same row as the ticket number from Column A.

Hopefully this makes sense. Any help would be great!
 

Attachments

  • Screenshot 2024-10-31 115137.jpg
    Screenshot 2024-10-31 115137.jpg
    52.4 KB · Views: 10

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
How about this formula in column D. You will need to adjust the ranges to suit your situation.
Excel Formula:
=XLOOKUP(VALUE(TEXTBEFORE(TEXTAFTER(A2,"Ticket number: 081"),"Passenger")),$B$2:$B$5,$C$2:$C$5)
 
Upvote 0
How about this formula in column D. You will need to adjust the ranges to suit your situation.
Excel Formula:
=XLOOKUP(VALUE(TEXTBEFORE(TEXTAFTER(A2,"Ticket number: 081"),"Passenger")),$B$2:$B$5,$C$2:$C$5)
Thank you Murray. I've tried that but it just produced an NA. Is that because in addition to trying to locate Column B(Ticket Number) t is also trying to locate Column C (Existing Invoice No) within Column A?
 
Upvote 0
No it's not that.

Try this instead. I couldn't tell if your ticket numbers in column B were values or text from the picture. If that doesn't work I'll need a sample of your data. You can either share a link or preferably use XL2BB.

Excel Formula:
=XLOOKUP(TEXTBEFORE(TEXTAFTER(A2,"Ticket number: 081"),"Passenger"),$B$2:$B$5,$C$2:$C$5)
 
Upvote 0

Forum statistics

Threads
1,224,809
Messages
6,181,075
Members
453,020
Latest member
mattg2448

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top