-1

I'm analyzing sales report data. I need to remove some unnecessary string. This string will be generated from the POS. It's a default format.

This is the default format:

  1. 1-99550 Alexander Keith #4924) on 27/12/2018 1:16:09PM for 0.00 hrs 0.00 min 56.00 sec
  2. 1-99551 Mark Smith #4924) on 27/12/2018 1:16:09PM for 0.00 hrs 0.00 min 56.00 sec

I need to remove "#4924) on 27/12/2018 1:16:09PM for 0.00 hrs 0.00 min 56.00 sec " part of the string.

cybernetic.nomad
  • 5,547
  • 3
  • 16
  • 26
vik2595
  • 5
  • 4
  • In case you're not sure about the number (it's not always going to be 4924), you might need "https://stackoverflow.com/questions/22542834/how-to-use-regular-expressions-regex-in-microsoft-excel-both-in-cell-and-loops". – Dominique Jan 02 '19 at 15:52

2 Answers2

2

Just use LEFT()/SEARCH():

=LEFT(A1,SEARCH("#",A1)-1)

Returns

1-99550 Alexander Keith

BruceWayne
  • 22,449
  • 14
  • 60
  • 100
1

Just Find #* (and Replace with 'nothing').

pnuts
  • 56,678
  • 9
  • 81
  • 133