Share via

Excel TEXTSPLIT Formula - 3 names issue

Anonymous
2024-11-19T07:03:36+00:00

Hi,

I have a spreadsheet with imported data that combines everything into 1 cell like this:

JobSiteA 14-20Oct24 Mickey Mouse A1supervisor 37.5 hrs $1815.00

I've used TEXTSPLIT on the spaces to break up the information into separate columns, which has been fine up until now.

I have a 3 word name that has pushed out the information so it doesn't line up for the last few columns (bold text in table below).

The spreadsheet consists of 3 tabs;

the first tab has columns for the first name, surname and rate information (for the XLOOKUP)

the second tab is for the import data (example above) and

the third tab is where the formulas are (looks like the example table below). I PDF this page to send off for approval.

Columns B to I populate from the TEXTSPLIT formula:- =TEXTSPLIT('Import Data'!$N2," ",-3)

Column A is the XLOOKUP formula:- =XLOOKUP($C2,FirstName,Rate,(XLOOKUP($D2,Surname,Rate,"")))

I've done the rate lookup on both first name and surname as sometimes the name is partially entered e.g., M Mouse or Mickey M.

Is there a way I can edit my formula to include the additional name either in the first name or surname column so the information lines up?

Is there a better way to do the formula to get what I need?

Ideally I'd also like to be able to either ignore the hours word column or merge it with the hours # column.

What I know about formulas has been picked up from forums, any advice would be appreciated.

Thanks.

Rate Site Week First Name Surname Role Hours # Hours Word Amount
Level 1 JobSiteA 14-20Oct24 Mickey Mouse A1supervisor 37.5 hrs $1815.00
Level 2 JobSiteA 14-20Oct24 Donald Duck A1plumber 1.6 hrs $164.12
Level 2 JobSiteA 14-20Oct24 Wile E Coyote A1electrician 4 hrs
Level 3 JobSiteA 14-20Oct24 Road Runner A1concreter 20.1 hrs $897.41
Level 3 JobSiteA 14-20Oct24 Fred Flintstone A1Labourer 23 hrs $1040.19
Level 3 JobSiteA 14-20Oct24 Barney Rubble A1plasterer 1.35 hrs $108.54
Level 3 JobSiteA 14-20Oct24 Bugs Bunny A1painter 2.6 hrs $235.10
Level 3 JobSiteA 14-20Oct24 Elmer Fudd A1cleaner 14 hrs $734.82
Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Rory Archibald 18,965 Reputation points Volunteer Moderator
2024-11-19T10:04:25+00:00

You could try something like this:

=LET(d,TEXTSPLIT('Import data'!$N2," ",-3),IF(COLUMNS(d)=8,CHOOSECOLS(d,1,2,3,4,5,6,8),HSTACK(CHOOSECOLS(d,1,2),TEXTJOIN(" ",TRUE,CHOOSECOLS(d,3,4)),CHOOSECOLS(d,5,6,7,9))))

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2024-11-21T04:57:55+00:00

    Thanks, I'll also look into this one :)

    Take your time, try out all the options and choose the one that suits you best.

    If you need further help I need to see your (sample) file. Then we can make you an example that suits your case.
    Why a sample file is important for troubleshooting. How to do it. - Microsoft Community

    Andreas.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-11-21T04:04:55+00:00

    Thanks, I'll also look into this one :)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-11-21T04:04:26+00:00

    Thanks I'll give this a go :)

    Was this answer helpful?

    0 comments No comments
  4. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2024-11-19T11:05:36+00:00

    I have a spreadsheet with imported data

    I would use Power Query to import the data.

    In there you can use a feature "add a column from example":
    https://support.microsoft.com/en-us/office/add-a-column-from-an-example-power-query-cd82c570-8da7-4d70-91a1-3827b5995eab

    Setup all this only once, if you get new data just click Data \ Refresh All and you're done.

    Andreas.

    Was this answer helpful?

    0 comments No comments