-
WShuishbob
AskWoody LoungerDang … that was easy … yep – it worked
I’d spent about an hour looking for this and for answers on the web – well done WOW
Thanks Hans
-
WShuishbob
AskWoody LoungerSuch a neat idea.
It works really well. Thank you – I think that this is THE answer.
I guess to be neat a bit ov VBA to do the sort but it could be a ‘recorded’ event.
Thnaks
-
WShuishbob
AskWoody LoungerYou’re right (of course) !
Much neater. I’ve not come across Offset before – handy.
Thanks for the tip
Bob
-
WShuishbob
AskWoody LoungerThe students I’m teaching are New to Excel and have never seen VBA before and I don’t want to do any “Just type this in” exercises. I like your code and may well use it myself however.
What I’ve done is taken your basic idea of the array though.
Ive written out every variation of 1234 and indexed it eg:
1-1-2-3-4
2-1-2-4-3
3-1-3-2-4
4-1-3-4-2-
etc (it gives 24 variations)
I’ve then used Roundup(Rand()*24 ,0) to get a number between 1 and 24 and used 4 lookups to read in the appriopriate numbers – seems to workBob
-
WShuishbob
AskWoody LoungerWOW!
Looks brilliant but I’m looking for something to do with relative novices. Either all within functions (as per my ugly method) or in very simple VBA if possible.
-
WShuishbob
AskWoody LoungerNo
Must always be 1234 but in different orders each time
-
WShuishbob
AskWoody LoungerI’ve been teaching Excel recently and have quite a ‘fun’ idea. What about recording spot heights (contour heights) over and area then using the surface map to create a 3D relief map of your local area?
A bit different to the norm I think?
Bob
-
WShuishbob
AskWoody LoungerBut … how do you get alternating shaded cells in the first place? I’ve tried to do this dozens of times with conditional formatting and have been successful but it’s been very tortuious.
-
WShuishbob
AskWoody LoungerThanks for that, it seems to work but it still leaves the other pictures on the worksheet. Isn’t it possible to delete a picture – I mean I loaded it in so I must be able to delete it?
-
WShuishbob
AskWoody LoungerI just can’t get it to work for me and I’ve tried and tried. I am a beginner so I’ve never actually done it at all. Someone wouldn’t like (mind) puttin together an example for me would they?
eg
Sub message(text)
msgbox(text)
end subthen place a command button on a page assigned to macro:
Message (“hello world”).Bob
-
WShuishbob
AskWoody LoungerI’ve a similar problem. I’d like to do something like:
Sub PutNumber(Number)
Range(“B3”).Select
ActiveCell.Value = Number
End SubThen have a button on my workbook that would be attached to a macro called PutNumber 5 for example. But this doesn’t work. Can you actually define a variable in this way? if not then what are the ()s for?
Bob
-
WShuishbob
AskWoody LoungerCouldn’t you use Match(Max(range) to find it’s location then index it? Something like
Index(Match(Max(range))) to get what is there – not a good example but an idea?Bob
-
WShuishbob
AskWoody LoungerI don’t really want to get into the complexity of your particular example but I’ve done something similar using AND and nested if’s
eg
IF(AND(A1>5,B2>5),good,If(AND(A1<5,B2<5),Bad,"You Got 5"))
or something like that. Check out AND in helpBob
-
WShuishbob
AskWoody LoungerThe ways round a problem can be very helpful – this certainaly looks as if it will work but …
I am a teacher and am looking for a solution that I can roll out over an intranet for children to use. I guess it’ll have to be a macro. I wondered if anyone had done it before – a ‘professional’ looking one with confirmation boxes etc.Bob
Bob -
WShuishbob
AskWoody LoungerThanks Charles. There’s loads of info here. I’m sure I’ll be able to sort it now.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
1 hour, 16 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
2 hours, 33 minutes ago -
The story of Windows Longhorn
by
Cybertooth
3 hours, 2 minutes ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
4 hours, 31 minutes ago -
Are manuals extinct?
by
Susan Bradley
39 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
13 hours, 39 minutes ago -
Network Issue
by
Casey H
44 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
1 day, 1 hour ago -
May 2025 Office non-Security updates
by
PKCano
1 day, 2 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
1 day, 4 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
4 hours, 53 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
1 day, 6 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
1 day, 6 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
1 day, 13 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
5 hours, 58 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
2 days ago -
How much I spent on the Mac mini
by
Will Fastie
1 day ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
3 hours, 59 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
2 days, 6 hours ago -
Setting up Windows 11
by
Susan Bradley
1 day, 1 hour ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
2 days, 2 hours ago -
Powershell version?
by
CWBillow
2 days, 3 hours ago -
SendTom Toys
by
CWBillow
14 hours ago -
Add shortcut to taskbar?
by
CWBillow
2 days, 7 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
2 days, 23 hours ago -
How can I install Skype on Windows 7?
by
Help
2 days, 22 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
2 days, 5 hours ago -
We live in a simulation
by
Alex5723
3 days, 13 hours ago -
Netplwiz not working
by
RetiredGeek
3 days ago -
Windows 11 24H2 is broadly available
by
Alex5723
4 days, 2 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.