-
WSriduwanz
AskWoody LoungerThanks Hans,
It works.
-
WSriduwanz
AskWoody LoungerThanks Rudi,
Unfortunately the case is not that simple. There are large amount of tables in different pages across 300+ pages. And to make things worse, that last comma is not the only comma in the table cell.
-
WSriduwanz
AskWoody LoungerHi Hans, I think I got it now…should have tried the formula with column B. Thank you.
-
WSriduwanz
AskWoody LoungerThanks Hans,
Am I missing something? The formula you suggested be placed in column C “removed” the repeated Management Company name (only cell C2 and C22 have contents now after the formula is copied down). I need to get rid of repeated Name (column
and at the same time maintaining that sorting.
Regards
Ridz -
WSriduwanz
AskWoody LoungerThanks Hans,
Is it possible to automate the plotting though? I am still using the codes you provided a while back to open each workbook and plot line charts. I am stumbled on plotting this kind of bar charts now.
Regards
Riduwan -
WSriduwanz
AskWoody LoungerThank you so much…it works wonder.
-
WSriduwanz
AskWoody LoungerThanks Hans,
Below are the lines of codes that were mostly “recorded”. I am still trying to put everything together and make them do: create a new XLS file from each record, transpose the data (column A is now the dates, column B is the NAV data), plot the charts, fix those labels issues and save the files. All with a click of button. Can help?
Sub CopyTranspose()
Sheets(“NAV”).Select
Sheets(“NAV”).Move
Rows(“2:2”).Select
Selection.Delete Shift:=xlUp
Rows(“1:2″).Select
Selection.Copy
Sheets.Add
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Cells.Find(What:=”100”, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
End SubSub PlotLineChart()
Dim myLineChart As Chart
Dim dBeginDate As Date
Dim dEndDate As Date
Dim intMonths As Integer
Application.ScreenUpdating = False
Const strTargetChartPath = “D:NotProcessed”
Range(“B1”).Select
newFileName = Selection.Cells.Value
newFileName = strTargetChartPath & newFileName
ActiveWorkbook.SaveAs Filename:=newFileName
Application.ScreenUpdating = False
Range(“B1”).Select
FinalPlotRow = Range(“B65536”).End(xlUp).Row
FinalPlotCell = “A1”
CompleteBlock = “B” & FinalPlotRow & “:A1”
Range(CompleteBlock).Name = “AreaToPlot”
MinimumValue = Application.Min(Range(“B:B”))
MinimumValue = Application.RoundDown(MinimumValue, -1)
MaximumValue = Application.Max(Range(“B:B”))
MaximumValue = Application.RoundUp(MaximumValue, -1)
MajorUnitValue = Application.Even(Application.RoundDown((MaximumValue – MinimumValue) / 4, 0))
‘ Beginning date.
Range(“B1”).Select
FinalRow = Range(“B65536”).End(xlUp).Row
FinalCell = “A” & FinalRow
dBeginDate = DateValue(Range(FinalCell))
‘ Ending Date.
dEndDate = DateValue(“31/7/2007”)
‘ Calculate number of months between dates.
intMonths = ((Year(dEndDate) – Year(dBeginDate)) * 12) + _
Month(dEndDate) – Month(dBeginDate)
‘ Display number of months.
NumberOfMonthValue = Application.RoundDown(Str$(intMonths) / 5, 0)
If NumberOfMonthValue <= 0 Then
NumberOfMonthValue = 1
End If
Set SourceData = ActiveSheet.Range("AreaToPlot")
Set myLineChart = Charts.Add
With myLineChart
.ChartType = xlLine
.SetSourceData Source:=SourceData, PlotBy:=xlColumns
.HasLegend = False
.Location Where:=xlLocationAsNewSheet
.HasTitle = False
End With
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.BaseUnitIsAuto = True
.MajorUnit = NumberOfMonthValue
.MajorUnitScale = xlMonths
.MinorUnitIsAuto = True
.Crosses = xlAutomatic
.AxisBetweenCategories = False
.ReversePlotOrder = False
End With
With ActiveChart.Axes(xlValue)
.MinimumScale = MinimumValue
.MaximumScaleIsAuto = True
.MajorUnit = MajorUnitValue
.MinorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
Sheets("Chart1").Select
Sheets("Chart1").Name = "Chart"
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Data"
Sheets("Chart").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
End SubThank you in advance.
-
WSriduwanz
AskWoody LoungerHow on earth do you know that I need to restart the PC?
Thank you Hans.
-
WSriduwanz
AskWoody LoungerThanks Hans,
I did as suggested (declaration and set the Options). But now I bumped into Error 424 at the same line.
Regards
Ridz -
WSriduwanz
AskWoody Lounger1. It was not declared anywhere else.
2. Word is running at all time.
Cheers
Ridz -
WSriduwanz
AskWoody LoungerDecember 5, 2005 at 7:16 am in reply to: Combining multiple records into single string (Office 2003) #988546More than good for me. I just need to replace the first occurance of ”
” after MemberNo.
Thank you once again.
-
WSriduwanz
AskWoody LoungerDecember 5, 2005 at 6:34 am in reply to: Combining multiple records into single string (Office 2003) #988544Thanks again Hans,
I probably did not make myself clear. Is it possible to make the combined data to be in Column A only with delimiters “” to represent the original Column and ”
” to represent original Row? I need to pull the data into Word and do mass find and replace.
Thanks.
-
WSriduwanz
AskWoody LoungerYou are a life saver…
Thank you so much
-
WSriduwanz
AskWoody LoungerThank you thank you….
At least it is pasted on Word now. But I have a new problem…the client has named the file with characters such as “.”, “&”, and I believe it is causing error 5152: Invalid file name at
.ActiveDocument.SaveAs Filename:=newWord
. Any quick fix apart from manually going through 1218 files and change the filenames?
Thank you again Hans
-
WSriduwanz
AskWoody LoungerI switched to Word and could not see anything out of ordinary, except the new doc is created.
I tried your suggestion to change the codes – now it gives me run time error 429: ActiveX component can’t create object at
Set appWord = GetObject(, "Word.Application")
Regards
Ridz
![]() |
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
-
Office apps read-only for family members
by
b
8 minutes ago -
Defunct domain for Microsoft account
by
CWBillow
5 hours, 30 minutes ago -
24H2??
by
CWBillow
2 hours, 4 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
2 hours, 48 minutes ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
9 hours, 3 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
2 hours, 29 minutes ago -
two pages side by side land scape
by
marc
1 day, 15 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
1 day, 17 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
20 hours, 49 minutes ago -
Security Essentials or Defender?
by
MalcolmP
23 hours, 34 minutes ago -
April 2025 updates out
by
Susan Bradley
6 hours, 8 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
16 hours, 55 minutes ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
7 hours ago -
Creating an Index in Word 365
by
CWBillow
1 day, 9 hours ago -
Coming at Word 365 and Table of Contents
by
CWBillow
1 day, 1 hour ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
2 days, 12 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
2 days, 16 hours ago -
W11 24H2 – Susan Bradley
by
G Pickerell
2 days, 18 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
2 days, 16 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
2 days, 9 hours ago -
I installed Windows 11 24H2
by
Will Fastie
15 hours, 52 minutes ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
2 days, 21 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
3 hours, 2 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
3 days, 5 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
2 days, 14 hours ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
2 days, 14 hours ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
3 days, 23 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
4 days, 7 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
7 hours ago -
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
3 days, 15 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.