These are probably the most frequently asked questions of all on the newsgroup. And unfortunately there is no single correct answer, which is why we see it come up time and time again. It's even more difficult to answer than a question about board width.
Every board feels different when you ride it. You might like a 155 of one model, a 165 of another and a 185 of something else. As with a lot of things, there are no hard and fast rules. Rent to begin with and try to demo your equipment before you buy.
Some rental shops use the rule of thumb that a board should touch between the beginner's chin and nose, which is fine if you are average build. A more accurate gauge is based upon your weight. The heavier you are, the longer/stiffer board you need otherwise you will over power it. If you are light, you need a shorter/flexier board otherwise you won't be able to turn it. If you are short and big, or tall and thin, then the "up-to-chin" rule is not going to work for you. However, height does have some influence as it can affect your stance width and in turn the overall length of the board.
Demo the board. If it's completely unstable, turns too quick, and generally all over the place, get something longer or less flexible. If it's impossible to turn and you can't get on with it, get something shorter or more flexible.
Based on personal experience I can offer the following useless advice, your best bet is to ignore this and do not buy a board based on this information alone.
At 80kg/175lbs and 1.97m/6'4, I use a stiff flex, 162 freeride board for all mountain use.
A friend is slightly heavier but about 15cm/6" shorter, he rides a fairly stiff 158 or 159, again for all mountain use.
This information is really provided in order to help you understand that the subject is not a simple one, and that it is not easy for people on the newsgroup to simply answer your question. You may post your question and not yield a single response. This isn't because of rudeness, but more likely that no-one can specifically answer your question. You could use the above examples, adding length and/or stiffness if you are heavier or reduce length and/or stiffness if you are lighter.
Unfortunately, doing a google search on the subject will likely return
several thousand hits, making it even more frustrating for you. The
best advice would be to rent and demo the board to give you an
idea. For sure, you will grow through boards, from starting out with a
shorter flexible board, you will gradually want something stiffer
and/or longer as you progress.