-
WSmikerickson
AskWoody LoungerIf SERV is a variable,
With WW.Columns(“O:O”)
Set Found_Index = .Cells(Application.Match(SERV & “*”, .Cells, 0), 1)
End WithIf “SERV” is the string you want to match,
With WW.Columns(“O:O”)
Set Found_Index = .Cells(Application.Match(“SERV*”, .Cells, 0), 1)
End With -
WSmikerickson
AskWoody Lounger=VLOOKUP(A1,{“None”,0;”Heat”,1;”Melt”,2;”Growth”,3;”Anneal”,4;”Cool”,5;”E_cool”,6},2,FALSE)
-
WSmikerickson
AskWoody LoungerThis works for me
Userform1.Label1.BackColor = Range(“A1”).Interior.Color -
WSmikerickson
AskWoody LoungerThe first array in LOOKUP has to be sorted ascending. Try
=LOOKUP(A1,{“Anneal”,”Cool”,”E_cool”,”Heat”,”Melt”,”None”},{3,1,0,4,5,6})
-
WSmikerickson
AskWoody LoungerThe unqualified Cells in the line
Set oscell = Cells.Find(k, , , , , xlNextTrue)
references the Active Sheet. Adding a dot
Set oscell = . Cells.Find(k, , , , , xlNextTrue)will cause it to reference the sheet specified in the With statement
-
WSmikerickson
AskWoody LoungerIf you have ModelA etc in column A and 2;0;1 in column B,
Selecting three cells in a column and entering the array formula=INDEX(A:A,SMALL(IF(B1:B30,ROW(B1:B3),999),ROW(Z1:Z3)),1)&””
should do what you want.
The B1:B3 can be changed to start in some row other than 1, but the Z1:Z3 range must start in row 1, its purpose is to generate the array {1;2;3…}Array formulas need to be confirmed with Ctrl-Shift-Enter (Cmd+Return for Mac)
-
WSmikerickson
AskWoody LoungerVBA is not nessesary
=SUBSTITUTE(MID(A6,FIND(CHAR(5),SUBSTITUTE(A6&””,””,CHAR(5),MAX(1,LEN(A6)-LEN(SUBSTITUTE(A6,””,””))-1))),255),””,””) -
WSmikerickson
AskWoody LoungerYou might make an Excel>Options>Custom List of the headers in the order that you want.
Then sort (left to right) on that custom list. -
WSmikerickson
AskWoody LoungerSub test() With ThisWorkbook.Sheets("Sheet1"): Rem adjust With Range(.Cells(2, 1), .Cells(.Rows.Count, 12).End(xlUp)) Rem sort by column L .Sort Key1:=.Columns(12), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Rem cut/insert blank cell rows to the top Application.CutCopyMode = False On Error GoTo HaltRoutine Application.Intersect(.EntireColumn, _ .Columns(12).SpecialCells(xlCellTypeBlanks).EntireRow).Cut .Range("a1").Insert shift:=xlDown HaltRoutine: On Error GoTo 0 Application.CutCopyMode = False End With End With End Sub
-
WSmikerickson
AskWoody LoungerI keep my generally useful macros in my Personal Macro Workbook.
To distribute them, I’d send a workbook with them in it to my co-workers and let them choose the macros that they find useful.
An add-in would have to be distributed like a workbook. (i.e. e-mail a file to someone)Handling problem situations and how to do updates would depend on how critical your macros are to the job at hand and what resources (including your time) the company is willing to allocate.
-
WSmikerickson
AskWoody LoungerYou can use the WorksheetFunction Index to return a specific row or column of a 2-Dimensional array.
Rem returns third column as a 2-D (n rows X 1 column) array myColumnA = Application.Index(myArray, 0, 3) Rem returns third column as a 1-D array myColumnB = Application.Transpose(Application.Index(myArray, 0, 3)) Rem returns the second row as a 1-D array myRow = Application.Index(myArray, 2, 0)
This fails with larger arrays.
On my Mac it fails if myArray has more than 4095 (=2^12 – 1) elements. It returns a TypeMismatch error.
The Windows versions have a much larger limit on WorksheetFunction.Index.Your 5X7 is well within either limit.
(Mac OS10.5 Excel2004)
-
WSmikerickson
AskWoody LoungerDim myArray as Variant myArray = Array(ArrCrew1Days, ArrCrew2Days,...)
is one way to do what you describe.
Using a 2-dimemsional array is another.
Dim myArray as Variant myArray = Range("A1:H10").Value
If you use the 2D array approach, the WorksheetFunction. Index can be used to extract whole rows or colums from myArray.
-
WSmikerickson
AskWoody LoungerSUMIF needs three arguements.
Perhaps =SUMIF(A1:A6, 2, A1:A6) will work for you.(The =COUNTIF(A1:A6,2)*2 is possibly faster)
-
WSmikerickson
AskWoody LoungerCombining MAX with the logic of the IF would give
=MAX(1, ROUNDUP((F5*F1)+F5,1)-0.01)
-
WSmikerickson
AskWoody LoungerUpDownToNorma is missing an L. It restores the up/down arrows to their normal functioning
That code would go in a normal code module, not a sheet’s code module. You would call AssignUp_DownKeys whenever you wanted the arrows to effect the listbox selection and UpDownToNorma when you want them to have their normal function.
![]() |
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
-
Login issues with Windows Hello
by
CWBillow
36 minutes ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
4 hours, 10 minutes ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
9 hours, 4 minutes ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
9 hours, 10 minutes ago -
Google AI is now hallucinating idioms
by
Alex5723
9 hours, 41 minutes ago -
april update
by
69800
5 hours, 40 minutes ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
10 hours, 36 minutes ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
10 hours, 48 minutes ago -
WuMgr not loading?
by
LHiggins
11 hours, 24 minutes ago -
Word crashes when accessing Help
by
CWBillow
2 hours, 51 minutes ago -
New Microsoft Nag — Danger! Danger! sign-in to your Microsoft Account
by
EricB
10 hours, 27 minutes ago -
Blank Inetpub folder
by
Susan Bradley
7 hours, 51 minutes ago -
Google : Extended Repair Program for Pixel 7a
by
Alex5723
20 hours, 58 minutes ago -
Updates seem to have broken Microsoft Edge
by
rebop2020
7 hours, 24 minutes ago -
Wait command?
by
CWBillow
14 hours, 15 minutes ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
1 day, 3 hours ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
1 day, 10 hours ago -
Windows 10 finally gets fix
by
Susan Bradley
1 day, 19 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.04.09.545
by
Alex5723
1 day, 20 hours ago -
How to use Skype after May?
by
Joann
4 hours, 46 minutes ago -
Win 7 MS Essentials suddenly not showing number of items scanned.
by
Oldtimer
1 day, 14 hours ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
2 days, 9 hours ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
2 days, 10 hours ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
9 hours, 25 minutes ago -
KB5056686 (.NET v8.0.15) Delivered Twice in April 2025
by
lmacri
15 hours, 36 minutes ago -
How to enable Extended Security Maintenance on Ubuntu 20.04 LTS before it dies
by
Alex5723
2 days, 21 hours ago -
Windows 11 Insider Preview build 26200.5562 released to DEV
by
joep517
3 days, 1 hour ago -
Windows 11 Insider Preview build 26120.3872 (24H2) released to BETA
by
joep517
3 days, 1 hour ago -
Unable to eject external hard drives
by
Robertos42
1 day, 12 hours ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
23 hours, 44 minutes 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.