Valmiki Ramayana Ayodhya Kanda Sarga 52 Shloka 17
Original Shlokaन मन्ये ब्रह्मचर्येऽस्ति स्वधीते वा फलोदयः। मार्दवार्जवयोर्वापि त्वां चेद्व्यसनमागतम्।।2.52.17।।
1 source checked for this shloka
त्वाम् to you, व्यसनम् grief, आगतं चेत् has come, ब्रह्मचर्ये celibacy, स्वधीते वा learning the Vedas, मार्दवार्जवयोर्वापि compassionate and pure, फलोदयः this is the result, नास्ति no use, मन्ये I think so.
If your celibacy and your grief are the consequences of your study of the Vedic lore, your compassionate nature and simplicity of character, I think there is no use of all these (virtues).