An 80-year-old man told the High Court that he felt he had won the lotto and lost the ticket after reading his millionaire sister's will and finding she had left much of it to charity.

Joseph Dee, who worked all his life as a factory machinist in Dublin, said he had been stunned and disappointed at receiving only €45,000 of the €3.5m handouts his sister Mary Coffey distributed in a seven-page will.

Mr Justice Nicholas Kearns, refused an application by Mr Dee to condemn his sister's will on the alleged grounds she was not mentally capable, was extremely easily led and had been badly advised.

"I am quite satisfied your sister was of sound mind and knew what she was doing in making the particular arrangements that she did," Mr Justice Kearns said.

"She was very conscious of the needs of charities and she made that her priority."

Michael Howard, SC, counsel for the executor of the will, told the court that Mrs Coffey, a former nurse, and her late farmer husband had built up a substantial farm at Barranstown Cross, Emly in Co Tipperary.

Mr Howard said that following her husband's death she had sold the land at the height of the market in 2005 for a very substantial sum and later missed the main effects of the financial crisis by having the money held in bank accounts.

Only €250,000 that had been invested in bank shares had been wiped out.

The court heard that Mrs Coffey had made dozens of bequests ranging from sums of between €100 to up to €50,000 to various charities for the poor, the deaf and the blind, and to hospices, the Samaritans and the Helicopter Rescue Service.

She had left comparatively small amounts to religious brothers, sisters, priests and missionaries and money towards the upkeep of churches.

Mr Howard said she had left €45,000 each to her brothers, Joseph and David, with whom she was living at the time of her death in November 2005 at the age of 87.

David Dee was not contesting the will.

He said that after up to 100 bequests Mrs Coffey's estate had been left with just under €2.8 million, which was to be distributed among charities as her executor, a distant cousin, was to decide.

Her solicitor William O'Donovan said Mrs Coffey had drawn up her own will and he had advised her on certain matters.

She had left only €30,000 to each of her brothers and on Mr O'Donovan's advice had increased these bequests to €45,000 each, a tax ceiling beneficial to both of them.

She was in good form and in his opinion perfectly capable of making her will.

Mrs Coffey's GP, Dr James McMorrow, told barrister David Humphries, who appeared with Mr Howard, that she had never at any time shown symptoms of suffering any mental deficit.

Mr Justice Kearns said Joseph Dee's world had been turned upside down when he discovered what had happened.

He was effectively stunned to discover that from an estate worth €3.5m, his sister had left him only €45,000.

Joseph Dee believed she would never have intended to leave him so little when she had so much to give.

Mr Justice Kearns said the challenge to the will could not possibly succeed.

He was satisfied Mrs Coffey was of sound mind when she had signed her will in front of three witnesses.