I have a spreadsheet for calculating services performed for clients. My supervisor wants to be able to create another spreadsheet that is used to record all the clients that have used the service. I have a button that copies from a sheet, NPSS_quote_sheet to another sheet, Costing_tool in the...
I have a small macro that uses the State entries to add Sales Regions to a spreadsheet. The macro adds a new column right of the Zip Code column, copies over the States and then uses the find/replace function to enter the Sales Regions. It's most likely not the most efficient method but it...
Hi Masters of Excel,
I can't seem to find a way to have my code loop through all sheets in a workbook. I've never worked with loops before. What I have tried only goes to sheet 2 so I have removed that. Any thoughts to get me in the right direction. Here is the code I am hoping to execute on...
I have the following hyperlink in sheet named 'Process' in cell B34:
Text to Display: CLICK HERE TO PERFORM THE FOLLOWING:
Type the cell reference: B34
The macro code is:
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
If Target.Range.Address = "$B$34"...
Hello,
I am very very new to creating macros. I'm trying to incorporate the Last Row function into my pivot table but I have no clue how to. The code I'm using is below. I am using Excel 2013.
Dim LR As Long
LR = ActiveSheet.Range("E:E").Cells.Find("*", SearchOrder:=xlByRows...
:)
Hi all,
I have the following code which will filter the columns as per my requirement but after filtering the columns i need to name the active cells as "Ship" in the column "Remarks" based on the used range column A. Please assist.
<code style="margin: 0px; padding: 0px; font-style...
Hi,
I have managed to alter some existing VBA code thanks to forum members help and lots of googling. The macro allows me to copy and paste data from multiple sheets into one consolidated sheet based on column headers. I'm very new to VBA.
Sometimes the sheets that are being copied do not...
I am currently using this code to replace words in my data:
Sub MultiReplace()
On Error GoTo errorcatch
Dim arrRules() As Variant
strSheet = "renamelist"
strRules = "A1:A100"
Set rngCol1 = Sheets(strSheet).Range(strRules)
Set rngCol2 = rngCol1.Offset(0, 1)
arrRules =...
Hi,
I have been trying to work through some VBA code that can solve the following problem:
Copy column data from multiple sheets and consolidate into one sheet "DOH_Master";
Column locations change month-to-month in the sheets where I need to extract data from, I have setup "DOH_Master" with...
Hi, I am trying to tweak this code so that instead of manually typing in the code the new month in MM format every new month I can just reference the value in cell K1 that updates on its own.
Is there a way that I can replace the month replacement value "/01/" with the data that is in cell K1...
Oh oh, what I do wrong?
I am on a sheet. On a second sheet I want to define a range, and do a search in that range...
Set c = Worksheets("CONFIGURATIONS").Range("A2", Cells(ActiveCell.End(xlDown).Row, ActiveCell.End(xlToRight).Column)).Find(Worksheets(ActiveSheet.name).Cells(1...
I thought this vba routine combined all sheets in workbook into a sheet labeled combined
It also included a column with name of sheet so I can pivot which is very helpful
but I have a workbook of over 128 sheets and the routine does not seem to catch all of the sheets
anyone see what the issue...
Hi All
Good day for you........
I Run below code i get run-time error. Please need you help
Sub GetFileCopyData()
Dim Fname As String
Dim SrcWbk As Workbook
Dim DestWbk As Workbook
Set DestWbk = ThisWorkbook
Fname = Application.GetOpenFilename(FileFilter:="Excel Files...
Hi All,
I've put a sample of my code below (it repeats for every 6th column up to GW). I get a run time error '91' Object Variable or With Block variable not set when the worksheet does not extend that many columns e.g. on my 3rd tab it only goes up to EN and I debugger highlights the line...
I need some help with modifying this code as I don't know how to code:
<code>Sub addDisclaimer()
LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
rows(LastRow + 1 & ":200").Select
Selection.Delete Shift:=xlUp
ActiveSheet.PageSetup.PrintArea = "$A$1:$M$" &...
Hi,
I'm trying to find a row based on a combobox1. It's working on one sheet, but not on another - on the other sheet it seems to delete the column below the one i'm expecting. Can anyone shed some light on why this might happen?
Private Sub CommandButton2_Click() Sheets("Study...
Hi Guys,
I have a macro that inserts rows in a workbook and is applied to all worksheets, this works great but I am trying to modify it to only work on the open worksheet (i am supposing this is activesheet) but it keeps failing.
The code that is working on all the sheets is as follows
Sub...
I upgrade from Excel for Mac 2011 to 2016 and am now getting the following error. This code takes |b and changes it into superscript b.
Dim gg As Range
Set gg = Range("a1:s16000")
gg.Replace What:="|d", Replacement:=ChrW(&H1D48), LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False...
I'm trying to delete a range of columns that have dates (starting at 9/1/2017) as headers. I need it to delete from 9-2017 -> 8-2018, but when I run the code it keeps: Sep-17, Oct-17, and deletes Sep-18 and Oct-18. I'm not quite sure what is happening. Here is the code:
Dim dateStart, dateEnd...
Hi! Thank you for reading my quick question!
What I need: I select a cell, then a variable stores its value, and looks for it on worksheet "1" in column ("B:B").
Sub findstring()
Dim CurrValue As String
CurrValue = ActiveCell.Value...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.