Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to format a field of names from LAST, FIRST MIDDLE to just FIRST LAST. in Excel I have this formula written out and am trying to mimic it, if possible (or find an alternative solution) for qlikview.
formula 1: =IF(E2="","",RIGHT(E2,LEN(E2)-FIND(",",E2)))&" "&IF(E2="","",LEFT(E2,FIND(",",E2)-1)) <-- this turns LAST, FIRST MIDDLE into FIRST MIDDLE LAST
formula 2: =LEFT(F2,FIND(" ",F2))&TRIM(RIGHT(SUBSTITUTE(F2," ",REPT(" ",99)),99)) <-- this turns FIRST MIDDLE LAST into FIRST LAST
thanks for your help!
You can also try this,
=subfield(Fieldname,',',2) &' '&subfield(Fieldname,',',1) ---convert Last, First Middle into First middle last
=subfield(trim(subfield(Fieldname,',',2)),' ',1)&' '&subfield(Fieldname,',',1)-- convert Last, First Middle into first last
Take a look at the INDEX() function.
You can also try this,
=subfield(Fieldname,',',2) &' '&subfield(Fieldname,',',1) ---convert Last, First Middle into First middle last
=subfield(trim(subfield(Fieldname,',',2)),' ',1)&' '&subfield(Fieldname,',',1)-- convert Last, First Middle into first last
the second formula worked perfectly! thank you so much!