-
WSGlennB
AskWoody LoungerWhat you need is :
=VLOOKUP(A3,INDIRECT(“testsheet.xls!”&A1),2)but the disadvantage is that it will only work when testsheet.xls is open.
Glenn.
-
WSGlennB
AskWoody LoungerMay 14, 2002 at 8:46 am in reply to: vlookup inside of macro (how to expand?) (Excel 97 SR-1) #587885It sounds as if a dynamic defined name for your look-up range will do the trick.
In the worksheet, use menu command Insert/Name/Define, and choose a name for the range containing all the values, e.g. LookList, and then in the Refers To box type this formula:
=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),5)
or something similar ( this formula is for sheet Sheet1, and for a look-up range containing only 5 columns ).The COUNTA function counts all non-blank entries in column A, and then the OFFSET function creates a range the same length as the count, and a wide as is necessary ( 5 in this case ).
Then you can use the name LookList in your VLOOKUP, so that the correct range is used every time.
Hope that helps.
Glenn. -
WSGlennB
AskWoody LoungerIf my memory serves me correctly I think it’s
=GET.WORKBOOK(4)
that will do the trick.
Glenn.
-
WSGlennB
AskWoody LoungerYou’ve already discovered the easiest way ( and, as far as I know the only way ) to do a waterfall chart.
Sorry, can’t really say any more than that
Glenn.
-
WSGlennB
AskWoody LoungerYou’re going the wrong way through the list … forward!!! You should be going backwards ( from the end upwards ), otherwise when you delete a row and go to the next, the row shifting upward will be skipped by the processing. Change your IF block to be :
If Range(“A” & I+1).Value = “” Then
Range(“A” & I+1).EntireRow.Delete
End IfCheers, Glenn.
-
WSGlennB
AskWoody Loungeruse single quotes around the two words of the sheet name, as in
=’Master Source’!A1That should fix it.
Glenn B -
WSGlennB
AskWoody LoungerNo, you’re not missing anything. The four arguments limit, and the fact that only one condition is allowed per argument means that it’s usefulness is quite limited, but when your needs can be met this way it’s a quick way to achieve something nifty very quickly.
Glenn Bumford
-
WSGlennB
AskWoody LoungerThanks John, have edited my posting now, so should make more sense.
Anyway, the rules for conditions of your own in Custom Formats is very similar to the standard, except that when you create conditions the rules go something like
[condition 1]number format 1 ; [condition 2]number format 2;number format 3;text
where number format 3 is applied to cells that fail conditions 1 and 2.Glenn Bumford
-
WSGlennB
AskWoody LoungerYou can have more than one section with a clause in it. Try this
[=-100]”NA”;[ red ][<0](#,##0);#,##0_)
which will make your negatives red with brackets round. ( Leave the spaces out of [ red ], as I've done this to stop it being mistaken for a posting font control string. )Glenn Bumford
-
WSGlennB
AskWoody LoungerUse a custom number format to display -100 as NA. Choose menu command Format/Cells and click the Number tab, and select Category “Custom” from the list on the left hand side, and then in the Type input box type this :
[=-100]”NA”;#0
and click the OK button, and that should do what you want.Glenn Bumford
-
WSGlennB
AskWoody LoungerHmm, you’ve said that maybe Application.WorksheetFunction.Round may only work in Excel 2000; well, in Excel 5 and Excel 95 the way to call this was Application.Round, so maybe that will work in Excel 97.
Glenn Bumford
-
WSGlennB
AskWoody LoungerSee this attachment. It uses defined names for each category and month, and defined names for the cells containing the choices made by the drop down lists. And finally it uses a defined name formula of
=EVALUATE(Category&” “&Month) in a name of Result, to calculate the required value.To define names for all categories and all months, select the block containing all of the data, including the row containing the month names, and including the column containing the category descriptions, and press Ctrl-Shift-F3 to create the required names ( it will display a prompt for how to create names, with tick-boxes, of which Top Row and Left Column are the boxes that need to be ticked before pressing OK ).
You define names for the drop down choice cells in a similar way, or use the menu command Insert/Name/Define to create names.I think this method is more readable than Legare Coleman’s ( post 82496 ), although this method does not recalculate automatically, i.e. after a choice has been made and a figure is returned, if then the actual figure in data changes, the amount shown by the formula “=Result” doesn’t update.
Glenn Bumford
-
WSGlennB
AskWoody LoungerYou can do this without sorting if you have 3 intermediate columns.
This example is using a list that extends to row 25.
Assuming that row 1 has text titles, and the data starts in row 2, then in column B from row 2 onwards have this formula
=MATCH(A2,$A$1:$A$25,0)
which calculates the row position of the first occurence of any animal.And in column C from row 2 onwards have this
=IF(NOT(ISNA(INDEX($A$1:$A$25,MATCH(ROW(),$B$1:$B$25,0)))),”here”,”not”)
which singles out the first occurence of the results in column B.And in column D have the number 1 in cell D1, and then also have this formula
=MATCH(“here”,OFFSET($C$1,D1,0,500,1),0)+D1
from row 2 onwards. Which collects the individual animal names row positions.Then in columns E and F have the results, using these formulae. In column E have this formula
=IF(ISNA(D2),IF(COUNTIF($E$1:E1,”=”)>0,””,””),INDEX($A$1:$A$25,D2))
from row 2 onwards. Which creates the names of the animals in the cells at the top of the column,
together with a special entry for blanks. And then in column F have this formula
=IF(E2=””,COUNTBLANK($A$1:$A$25),IF(ISNA(D2),””,COUNTIF($A$1:$A$25,”=”&E2)))
which gives the count for each animal.You can then group the columns B thru’ D, or hide them, as they are only necessary as intermediate steps.
Hope this is useful.
Glenn B
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
9 hours, 16 minutes ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
5 hours ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
7 hours, 51 minutes ago -
Discover the Best AI Tools for Everything
by
Alex5723
7 hours, 59 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
8 hours, 43 minutes ago -
Rufus is available from the MSFT Store
by
PL1
6 hours, 11 minutes ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
1 day, 9 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
15 hours, 27 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
11 hours, 38 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
1 day, 4 hours ago -
Office gets current release
by
Susan Bradley
1 day, 7 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
2 days, 21 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
2 days, 6 hours ago -
Stop the OneDrive defaults
by
CWBillow
2 days, 22 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
3 days, 8 hours ago -
X Suspends Encrypted DMs
by
Alex5723
3 days, 10 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
3 days, 10 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
3 days, 11 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
3 days, 11 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
3 days ago -
Enabling Secureboot
by
ITguy
3 days, 7 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
3 days, 19 hours ago -
No more rounded corners??
by
CWBillow
3 days, 15 hours ago -
Android 15 and IPV6
by
Win7and10
3 days, 5 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
4 days, 8 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
4 days, 10 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
4 days, 5 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
4 days, 18 hours ago -
May preview updates
by
Susan Bradley
4 days, 5 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 days, 21 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
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.