# Excel Chess



## termeric

Hello, 

i was just wondering if any one had put together a good chess game using excel.

im currently just using a shared workbook with letters that represent the pieces and lowecase vs uppercase letters as teams.  its crude but works fairly well.


thanks,

christian.


----------



## TrippyTom

height = 50
width = 12

conditional format the area to color the squares:
=MOD(COLUMN(),2)=MOD(ROW(),2)

* This pattern is incorrect (it's the inverse of what it should be) so color the conditional formatted cells white and then color the entire area manually a darker color to get the proper placement of the black to white setup - each player should have a black square on the left bottom when they face the board

I'm sure you could get graphics of chess pieces on google and just place them on your workbook.

This will get you started...  To go further, you could setup a named range for each square and use that in VBA code if you wanted to program a history of moves and such.


----------



## erik.van.geit

Hello,

I've got a chessboard in Excel with autoshapes, but never continued to programm it. Could give you some ideas. Feel free to email me, I'll send you the file.

kind regards,
Erik


----------



## just_jon

Ah, but one of the true pleasures of chess is the sight and feel of the wooden board and the contours of the pieces.


----------



## erik.van.geit

just_jon said:
			
		

> Ah, but one of the true pleasures of chess is the sight and feel of the wooden board and the contours of the pieces.


YES!! fully agree (that's why I never finished the Excelchessboard)

BUT
for some - me included - one of the true pleasures of Excel is to create needless applications on the screen within the contours of the cells


----------



## RichardS

You can find gif's of chess peaces at http://www.chessvariants.com/d.pieces/


----------



## Oorang

Making a chess AI would be quite a challange. Not only that, in a language as slow as VBA I'm sure the calculation time would be prohibitive. Although it probably would doable if you just made it for humans to play each other hotseat.


----------



## termeric

i whole heartidly agree that a wooden pieces and a face to face confrontation is the best way to play the game.

i ended up just sharing a workbook and used CAPS vs lowercase until a friend went out and got pictures of the pieces.  it works pretty good on slow days.


----------



## gingerafro

If you PM me your e-mail address, I'll send you what I created about 6 years ago, back when I was foolish and all macros were recorded (hence why I know when it was created).

It runs off a dialog box (not even a userform) so you can see it is quite basic, but works quite nicely for a human v human match.  I'm in agreement with Oorang that AI in VBA would probably be impossible.


----------



## Oorang

You know whose opinion I'd like to get on this topic? Aladdin Akyurek. I know he is a LISP programmer, which makes me think he could offer a quite qualified response on the feasibility of using VBA for a Chess AI.


----------



## jollierme

termeric said:


> Hello,
> 
> i was just wondering if any one had put together a good chess game using excel.
> 
> im currently just using a shared workbook with letters that represent the pieces and lowecase vs uppercase letters as teams. its crude but works fairly well.
> 
> 
> thanks,
> 
> christian.


 

I know this post is 2+ years late, but I've been working on an Excel chess workbook (http://jollierme.com/Chess.html). It's not terribly attractive, but it has all of the logic for human and computer players (meaning that it does not allow illegal moves). The computer can currently only play a random move. My next step will be to add AI. As Oorang mentioned, VBA's lack of speed may cause the AI to be too slow to be any good, but I intend to find out!.


----------



## golfbum71

I may not be smart enough to get Excel to actually play Chess, but if there are guys that can, this forum has it.

And if someone can teach a spam filter to play chess someone has to be able to make it work.

This article explains the spam filter part and how the guy got it to work...it's over my head, but probably not over everyone here...and it may help with the eventual solution.

http://dbacl.sourceforge.net/spam_chess-1.html

Cheers,
Geoff


----------



## HippoCampus

Good afternoon

this is not a bad effort although it does not use 'picture' pieces

http://jollierme.com/Chess.html

this is a nice visual one but the moves are not automatic

http://ca.geocities.com/ninek_zg/Excel/Excel_VBA_EN.htm

Have fun

Hippo


----------



## steve case

I've got an Excel version of the board and men that I cobbled up, but no, I'm not about to try to program it to play the game.  I occasionally use it to set up chess problems so I can move the pieces around, it's a little faster than getting out the board an box of chessmen. 

stacase@hotmail.com


----------



## RossMcColl

Can someone program me an Excel girlfriend.

Stupid lonely Valentines day


----------



## alphadown

TrippyTom said:


> conditional format the area to color the squares:
> =MOD(COLUMN(),2)=MOD(ROW(),2)
> 
> * This pattern is incorrect (it's the inverse of what it should be) so color the conditional formatted cells white and then color the entire area manually a darker color to get the proper placement of the black to white setup - each player should have a black square on the left bottom when they face the board



I know this is a very old post to reply to, but one little change fixes the colouring
=MOD(COLUMN(),2)*<>*MOD(ROW(),2)


----------



## Domski

RossMcColl said:


> Can someone program me an Excel girlfriend.
> 
> Stupid lonely Valentines day


 
Any luck? Send her up to Leeds if you don't get on


----------

