Swatch/Guage Question

I am swatching before I start knitting the Hey Teach sweater pattern. I knit 17 stitches and 24 rows per directions. I did come up with 4 inches in height, but my width is short by almost three quarters of an inch. Will it be ok to go up a needle size to come up with correct width, but end up with extra height?

Don’t worry so much about the row gauge, you need to match the stitch gauge. Also, cast on extra stitches so you don’t use the end sts in measuring. They’re a different size than the middle ones and curl under and can give you the wrong measurement. So cast on about 25 sts and knit about 3-4", then measure. It’s also a good idea to wash and/or block your swatch as some yarns relax and stretch or shrink up a little.