ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula or Macro needed? (https://www.excelbanter.com/excel-discussion-misc-queries/49862-formula-macro-needed.html)

Query

Formula or Macro needed?
 

Hi, I need some help desperately, for reasons which are too complicated
to go into right here and now, I need a formula or a macro to produce
an excel spreadsheet of 16 columns and 16 rows where each row and each
column contains the numbers 1 through to 16 without the same number
repeated on any row or any column - I know it may sound a little tricky
:eek: but I'm hoping somebody is up for a challenge like this and
can help rather quickly - I'm not interested in the number of
permutations or anything daft like that - I just need a solution.

Thanks to anybody who knows and can post how to help me out of this
trickly situation..


--
Query
------------------------------------------------------------------------
Query's Profile: http://www.excelforum.com/member.php...o&userid=28013
View this thread: http://www.excelforum.com/showthread...hreadid=475189


pinmaster


Hi
How about this:
First column enter 1,2,3...etc up to 16, first row enter
1,16,15,14...etc up to 2, then in the second row of the second column
enter a formula that refers to the first cell in your grid then drag
across and down.

Hope this helps!
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=475189


Query


Thanks for your reply, you mention "then in the second row of the second
column enter a formula that refers to the first cell in your grid" -
what is the formula that I should enter?


--
Query
------------------------------------------------------------------------
Query's Profile: http://www.excelforum.com/member.php...o&userid=28013
View this thread: http://www.excelforum.com/showthread...hreadid=475189


pinmaster


Hi
If the first cell in your grid is A1 then
=A1

HTH
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=475189


pinmaster


Hi,
Update....if you want a totally random look to your grid then try the
following once you have your grid set up the way I mentioned before.
Copy and paste over the grid using the "paste special" option and
selecting "values", this will get rid of the formula and leave you with
numbers only.
Now insert random numbers directly to the left or right of the grid by
using the =RAND() formula and then draging down, then select and sort
your grid using the random numbers. You can do the same with your
columns by using the same formula directly above or below the grid and
sorting from left to right instead of up and down.

Hope this helps!
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=475189



All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com