-
WSready4data
AskWoody LoungerThanks to both. That was the issue exactly.
Scott -
WSready4data
AskWoody LoungerMark,
I was thinking that similar to the trendline in Excel if the last point of the hypothetical trendline in my table is higher than the starting point the trend would be “Up” and vice versa.
But I can’t simply take the first and last month’s revenue and do a calculation because the months between them would not be figured into the trend.
Excel computes the values for the trendline taking all the months into consideration.Scott
-
WSready4data
AskWoody LoungerFrancois,
Scary how almost live this forum is. Or I need to be able to type faster.
Thanks to all. -
WSready4data
AskWoody LoungerSorry,
Should have looked before I posted. I just had to add 2 lines (in bold)Thanks for the solution
Function CreateDealerList()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim rst As DAO.Recordset
Dim strUsername As String
Dim strSQL As String
Dim strDataID As String
Dim strDealer As StringSet db = CurrentDb
strSQL = “SELECT DATA_ID, User, Dealer ” & _
“FROM tblDealers ORDER BY User, Dealer”DoCmd.SetWarnings False
DoCmd.RunSQL “DELETE * FROM tblDealerList;”
DoCmd.SetWarnings True
Set rs = db.OpenRecordset(strSQL)
Set rst = db.OpenRecordset(“tblDealerList”)Do While Not rs.EOF
strUsername = rs!User
[indent]strDealer = “”
strDataID = “”[/indent]
Do Until strUsername rs!User
strDealer = strDealer & “|” & rs!Dealer
strDataID = strDataID & “|” & rs!Data_ID
rs.MoveNext
If rs.EOF Then Exit Do
Loop
rst.AddNew
rst!User = strUsername
rst!Data_ID = Mid(strDataID, 2)
rst!Dealer = Mid(strDealer, 2)
rst.Update
If rs.EOF Then Exit Do
rs.MoveNext
Looprst.Close
rs.Close
Set rst = Nothing
Set rs = Nothing
Set db = Nothing
End Function -
WSready4data
AskWoody LoungerHans,
Its almost there but something isn’t looping correctly.
Here is the output.
Here is a sample database with your function if you can take a look.Thanks,
Scott -
WSready4data
AskWoody Loungerdavid,
I tried that too. Still same message.Scott
-
WSready4data
AskWoody LoungerNot when it is on the very last record.
Scott -
WSready4data
AskWoody LoungerDavid,
Thanks but it never gets to that point when its on the last record. Its still in the inside loop.
Scott -
WSready4data
AskWoody LoungerI don’t understand your description. “the column names” of what?
Hans,
Sorry, I’m speaking ot the field names in the table.Scott
-
WSready4data
AskWoody LoungerYou have to treat null (blank) values separately. Try
SELECT BranchID, Selected, PreviousSelected
FROM tblBranch
WHERE (SelectedPreviousSelected) Or (Selected Is Not Null And PreviousSelected Is Null) Or (Selected Is Null And PreviousSelected Is Not Null)Thanks Hans that did the trick
Scott -
WSready4data
AskWoody LoungerHans,
I could add a date field and modify the date anytime the record is updated.
I’m not opposed to a total a new approach since this is a new project.Scott
-
WSready4data
AskWoody LoungerHans,
I can’t thank you enough.
That worked perfectly.Scott
-
WSready4data
AskWoody LoungerHans,
That makes some sense. I’ll see what it looks like.
Thanks,
Scott -
WSready4data
AskWoody LoungerHans,
I included the Function to show you how the cells in the row get their value.
I modified the Function so if there isn’t any sum involved, it won’t place a zero in the cell.Function SumAll(sCell As String) Dim wks As Worksheet Dim dSum As Double Dim iCount As Integer Application.Volatile iCount = 0 dSum = 0 For Each wks In Worksheets dSum = dSum + Application.Sum(wks.Range(sCell)) Next If dSum = 0 Then SumAll = "" Else SumAll = dSum End If Set wks = Nothing End Function
Then using your original formula, I can achieve the results I want.
-
WSready4data
AskWoody LoungerHans,
I found that example on the web and the problem is a zero value.
The row has 12 columns(months) plus a description in the first column.
As they fill in the template sheet every month, the next column of the row(data i’m looking for) will data in it.
I’m using this function to calculate the values in the cellsFunction SumAll(sCell As String) Dim wks As Worksheet Dim dSum As Double Dim iCount As Intege Application.Volatile iCount = 0 dSum = 0 For Each wks In Worksheets dSum = dSum + Application.Sum(wks.Range(sCell)) Next SumAll = dSum Set wks = Nothing End Function
Should this be modified to make your formula work?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Windows 11 Insider Preview build 26200.5518 released to DEV
by
joep517
2 hours, 2 minutes ago -
Windows 11 Insider Preview build 26120.3671 (24H2) released to BETA
by
joep517
2 hours, 4 minutes ago -
Forcing(or trying to) save Local Documents to OneDrive
by
PateWilliam
10 hours, 56 minutes ago -
Hotpatch for Windows client now available (Enterprise)
by
Alex5723
11 hours, 35 minutes ago -
MS-DEFCON 2: Seven months and counting
by
Susan Bradley
38 minutes ago -
My 3 monitors go black & then the Taskbar is moved to center monitor
by
saturn2233
21 hours, 51 minutes ago -
Apple backports fixes
by
Susan Bradley
2 hours, 26 minutes ago -
Win 11 24H2 will not install
by
Michael1950
22 hours, 5 minutes ago -
Advice to convert MBR to GPT and install Windows 11 Pro on unsupported PC
by
Andy M
21 hours, 36 minutes ago -
Photos from iPhone to Win 10 duplicating/reformatting to .mov
by
J9438
7 hours, 16 minutes ago -
Thunderbird in trouble. Here comes Thundermail
by
Alex5723
21 hours, 52 minutes ago -
Get back ” Open With” in context menus
by
CWBillow
1 day, 10 hours ago -
Many AMD Ryzen 9800X3D on ASRock have died
by
Alex5723
2 hours, 45 minutes ago -
simple general stupid question
by
WSaltamirano
1 day, 8 hours ago -
April 2025 Office non-Security updates
by
PKCano
2 days, 1 hour ago -
Microsoft wants to hear from you
by
Will Fastie
1 day, 1 hour ago -
Windows 11 Insider Preview Build 22635.5160 (23H2) released to BETA
by
joep517
2 days, 5 hours ago -
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
2 days, 10 hours ago -
Test post
by
Susan Bradley
2 days, 12 hours ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
2 days, 14 hours ago -
SSD shuts down on its own
by
CWBillow
2 days, 5 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 22 hours ago -
OneDrive File Sharing Changes
by
David Clark
3 days ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
2 days ago -
Today is world backup day
by
Alex5723
2 days, 16 hours ago -
Windows .exe on Mint
by
Slowpoke47
2 hours, 44 minutes ago -
Reviewing your licensing options
by
Susan Bradley
10 hours, 41 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
32 minutes ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
1 day, 17 hours ago -
Making sense of Settings in Windows 11
by
Simon Bisson
1 day, 18 hours ago
Recent blog posts
- MS-DEFCON 2: Seven months and counting
- Apple backports fixes
- April 2025 Office non-Security updates
- Microsoft wants to hear from you
- Reviewing your licensing options
- Apple has been analyzing your photos since September 2024
- What Windows 11 24H2 offers beyond bugs
- Making sense of Settings in Windows 11
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.