Friday, 17 February 2012

Couple of Useful Excel Tips

This is a nice one I'd lost and just needed again - counting the numner of occurrences of a particular character in a string: =LEN(cell_ref)-LEN(SUBSTITUTE(cell_ref,"a","")) Thank you, Ms Phillips! And then this piece of genius for those frustrating times when your vlookups don't work. Changing "format cells" doesn't work, I now know because that just affects their presentation, not the data themselves. So if you're trying to match something that might be a number with something that's probably text and not getting anywhere, here's the answer! "The cell values have to match exactly, including format, for your VLOOKUPs to work. However, you can achieve this quite easily within the formula without having to change a lot of values. If column A contains proper numbers and column C has "text" numbers, then change your formula to this: =VLOOKUP(C2*1,A:B,1,FALSE) The *1 will force the value in C2 to be treated as a number. If you have text values in column A and proper numbers in column C, then make this change: =VLOOKUP(C2&"",A:B,1,FALSE) Hope this helps. Pete" Thanks to Pete_UK, if that is your real name.....

No comments: