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: 5

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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