Certified GKH Gardening Expert
Harvest celery as soon as it's large enough to use. Either cut off individual stems as they develop color or pull the entire plant and cut off the roots. Celery should be harvested when the petioles (stalks) from the soil line to the first node are at least 6 inches long.
Once the tops begin to lay over, usually by late summer, onions are ready to be lifted. If it's immature onions (scallions) you are referring to, then this article will help: https://www.gardeningknowhow.com/edible/vegetables/onion/harvesting-scallions.htm