I am not sure where I should post this. I have an Excel spreadsheet with some cells I would like to concatenate into one resulting cell. I can get the cells concatinated, but I would like to concatenate one cell to the degrees symbol, followed by a space, followed by the next cell concatenated to the minutes symbol, followed by a space, followed by the third cell concatenated to the seconds symbol. I think I can do this if I knew where I can find the symbols, but do not know where can I find them.
So, you need to search the strings in each cell for the delimiting character, then do a substring to get the part you want, and concatenate the substrings. I bet there is a char index function and a substring function - anticipation, since Excel is like SQL on training wheels. If you use relative addresses, it should duplicate nicely.
Say cells A1,B1 and C1 contain degrees,minutes and seconds, then this will do the trick:
=TEXT(INT(A1);"0° ")&TEXT(INT(B1);"0' ")&TEXT(INT(C1);"0'' ")
Change ';' to ',' if needed. Over here we use comma as a decimal separator so it is replaced by ';' in formulas. Use two single quotes for the seconds, not a single double quote.
You could also write a macro in VBA for it, but I guess this is the simplest way.
Some members post in the Visual basic 4/5/6 forum for their Excel questions.
I was reviewing each of the new cell values and I see that the decimal portion of the seconds cell is getting dropped or rounded, I am not sure which. Is there a way so that the seconds will show up like 49.2" instead of just 49"?
Again thank you for your help. I modified what you said slightly. I only needed one extra decimal position so I changed the contents of the cell to be =TEXT(INT(H2),"0° ")&TEXT(INT(I2),"0' ")&TEXT(ROUND(J2,1),"0.0'' "). I had spent almost an entire day searching the web for help with this prior to asking for it here.
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.