Generally speaking, ellipsis of the resulting clause is required in the use of "if only...". For this reason, the sentence #1 below will be easily accepted. On the other hand, the sentence #2 is usually not permitted despite its logical meaning is similar to #1. Therefore, I would like to check the acceptability of #2.
If only I had more money!
If I had more money!