• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel formula for adding an asterisk in front of a text.

looktroniks

New Member
Hi guys, I have this excel formula:

~group.bdpj.pjcsa cols=3;

where=(instr(bdpj.pjcsa.roundedvalue,"<")=0

and bdpj.pjcsa.sch_code="S_PTS"

and bdpj.pjcsa.AnalyteCode<>"IMP"

and bdpj.pjcsa.AnayteCode<>"PT")~

~bdsc.sa.analytename~


which i believe retrieves data from from a database. This formula outputs data like this on excel:


Pt 3 ppm Si 4 ppm Zn 2 ppm

Rh 4 ppm Sb 3 ppm Co 3 ppm

Au 2 ppm Sn 2 ppm Te 3 ppm

Ag 2 ppm Ti 3 ppm Se 4 ppm

Cu 18 ppm As 4 ppm

Pb 8 ppm Bi 4 ppm


As you can see its 3 (element, results and unit) fields displayed in 3 groups of columns. What I need is to Add a formula that can check the elements, everywhere the element is "Ag" it must concatenate that to "Ag*" this must be done on all the occurrences of Ag.
 
Hi looktroniks,


Welcome to the forum, I don't understand your formula but with your data output in Excel in columns under the headings Element, Results, Unit, then in say column E in E2


=IF(A2="","",IF(LEFT(A2,2)="Ag",LEFT(A2,2)&"*"&MID(A2,3,10),A2))


Drag over to column G and down as far as required
 
Back
Top