Macros and VBA
6493 TopicsMulti-replace Macro
Hey all, I need some assistance creating a macro that replaces multiple phrases. Below are the phrases I have and the phrases I want them changed to without having to manually use "Find and Replace" each time. "ROr ROY" replaced with "LK Fin" "OKP and DON" replaced with "HU Dep" "Signs (Single)" replaced with "PE Dep" When I look elsewhere, I'm shown how to replace words but not phrases. Any assistance would be greatly appreciated.28Views0likes1CommentReference sheet numbers in hyperlink
I want to be able to link a specific shape to a sheet by the sheet number, not its name. Using the standard method, by selecting 'hyperlink', only a list of sheet names appear. Inserting a onclick() macro into the initial sheet would work but I cannot figure out how to reference a sheet by its number. All help appreciated.28Views0likes2CommentsVBA Data Import
Looking for VBA code to parse a list. The list is an extract of a music playlist which retains the Line 1 "name of song", skips the second line which is a repeat of Line 1. Line 3: Retains Artist name Line 4: Retains Album Name Line 5: Time of song - Will probably have to manually move or delete these manually The list is one of my Playlist from Amazon Music Prime. Thank you. Song Artist Album Time Whisper Whisper Marion Meadows Whisper 4:16 Just Doing Me Just Doing Me Marion Meadows Just Doing Me 2:54 Midnight Bolero Midnight Bolero Armik Amor De Guitarra 4:52 Every Kinda People Every Kinda People Architects of Sound71Views0likes3CommentsNot including all columns when consolidating multiple Excel onto one tab?
Hello - I am running the following VBA code to write all rows/columns from multiple worksheets (in the same workbook) onto a 'consolidated' worksheet in that same workbook. My columns on all worksheets are the same and go out to Column 'BT'. My script runs fine, but is only writing out to Column 'BN' in my 'Consolidated' worksheet. Why is it cutting off Columns 'BM' thru 'BT'? Here is the VBA code I'm running: Sub ConsolidateVisibleSheets() Dim ws As Worksheet Dim destSheet As Worksheet Dim lastRow As Long, destLastRow As Long Dim copyRange As Range ' Create or activate the destination sheet On Error Resume Next Set destSheet = ThisWorkbook.Sheets("Consolidated") If destSheet Is Nothing Then Set destSheet = ThisWorkbook.Sheets.Add destSheet.Name = "Consolidated" End If On Error GoTo 0 destSheet.Cells.Clear ' Clear existing data on the destination sheet ' Loop through all sheets in the workbook For Each ws In ThisWorkbook.Sheets ' Skip hidden sheets and the destination sheet If ws.Visible = xlSheetVisible And ws.Name <> destSheet.Name Then ' Find the last row of data in the current sheet lastRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row ' Define the range to copy Set copyRange = ws.Range("A1", ws.Cells(lastRow, ws.Columns.Count).End(xlToLeft)) ' Find the last row in the destination sheet destLastRow = destSheet.Cells(destSheet.Rows.Count, 1).End(xlUp).Row + 1 ' Copy and paste with formatting copyRange.Copy destSheet.Cells(destLastRow, 1).PasteSpecial Paste:=xlPasteAllUsingSourceTheme End If Next ws ' Clean up Application.CutCopyMode = False MsgBox "Data consolidated successfully!", vbInformation End Sub Any help is greatly appreciated!39Views0likes1CommentExcel macro VBA issues
Hey guys. - I wrote a macro, which contain other macros using Call orders. If I running the macros separately everything ok, from the main macro one of them didn't running it's like it skipped from the list. Reason unknown. -On running I can see 4 application window get visible, and those didn't connect any kind of application. Also a Clipboard error message get visible, but I get a Clipboard cleaning macro, which several times cleaning the Clipboard, so it can't be. It's like a hack, or something which I don't recognize. - One a sheets called Total, I can't use the built in group function and can't collapse the selected section so the project I working on lost functionality. I didn't make any change on that side, but previously it was useable. Thanks for help in advance. Cheers. Zsolt44Views0likes2CommentsExcel 365 High CPu usage
Guys. Another issue not VBA-specific but it's important. I have an excel file and it's worked just fine. Without any huge changes, currently if I do something i.e change a sheet , jst try copy a cell my application is just freeze and in task manager the CPU show me a high % of usage. GPU-0 3 D- just will be visible and the power usage change from low to very high. I run the file without releasing VBA, but the result is the same. What it is? Excel 365. (Yesterday i did a reinstalling process.) You can see a short movie with explanation related to this issue. Attached to this message. Thanks your answers.2.5KViews1like2CommentsButton with macro is not functioning
I created a macro. Then I added a button and added the macro to the button. When I press the button I get a message: the macro can not be executed. If I execute the same macro without using the button, there is no problem. What am I doing wrong?61Views0likes2CommentsMacro to copy
Hello all you "Brilliant Minds" here is a chance to prove your "Excel-ence. I want to copy a value to one cell from the source which is random and as I haven't a clue about this stuff I asked Microsoft CoPilot. Being on the 4th version Where Microsoft excel still will not accept Microsoft CoPilot's creation, I am appealing to the Community. So here is your chance to prove that you are smarter than CoPilot. Here we go, everything but attach a file. If anyone is interested send me an email so I can send a couple of small files. Donald255Views0likes15Comments