excel - How to keep nth word of a cell -
excel - How to keep nth word of a cell -
i want maintain sec word of cells in column. possible? want without using reference.
column1 hi hello me 0 10 stack overflow
notice 1 column. want tun column into:
column1 hello me 10 overflow
is possible? know how using additional column reference not sure how job in 1 column. i'd appreciate help.
without using column, vba. select cells wish process , run little macro:
sub secondword() each r in selection v = r.value if instr(v, " ") > 0 r.value = split(r.value, " ")(1) end if next r end sub
macros easy install , use:
alt-f11 brings vbe window alt-i alt-m opens fresh module paste stuff in , close vbe windowif save workbook, macro saved it. if using version of excel later 2003, must save file .xlsm rather .xlsx
to remove macro:
bring vbe window above clear code out close vbe windowto utilize macro excel:
alt-f8 select macro touch runto larn more macros in general, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
and
http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx
macros must enabled work!
excel
Comments
Post a Comment