ANy other way to write this code..
ActiveWorkbook.Sheets("Sur").Columns("R:R").Select
Selection.Insert Shift:=xlToRight
Columns("S:S").Select
Selection.Copy
Columns("R:R").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False...
HI, I am brand new to writing macros and am just learning on the fly right now. I recorded a macro that I am now trying to loop. I will have up to 1000 rows of data that I need to run through my file and produce out put from. Below is the macro I currently have:
Rows("3:3").Select...
I created a macro that will copy all the values from each month and paste it to [column AK]. The current code is static with fixed ranges and I force to run the macro (using alt+f8) on every sheet since I have multiple sheets.
I'm trying to find a way that will make my codes shorter and more...
Help! my recorded macro is below. My issue is, workbook "billing.xlsm" name will vary such as: "billing 1" or "billing 2" etc.
I have tried applying solutions i have read in forums but i might be going about it wrong.
Sub Auto_Copy_Invoice_From_Color()...
This code uses GetOpenFilename and opens up a file window so that the user can select a Workbook
The problem I am having is when a user changes their mind and doesn't select a workbook. If this happens the user gets a Run-time error which I never want to happen.
How do I stop this from...
Hello everyone,
I am completely new to VBA, but the process I now need to perform is forcing me into learning about it.
Currently I'm working on a summary workbook that needs to pull data from multiple different workbooks. All of the workbooks I need to pull from are formatted the exact same...
Hi,
I am trying to populate and clear fields using a check box.
I have written something long and stupid that will not work. Can someone help me.
This is what I have:
If Sheets("MISC DATA").Range("C18").Value = "TRUE" Then
Range("F5:N5").Select
Selection.Copy...
Hi all,
I've got a large Excel document with about 16 worksheets. Alot of the cells have a colon at the end of the strng, but not all. I need to remove all of the colons sp that my Index Match formulas will work. I've recorded quide a detailed Macro and added the code in to remove the colons as...
This code is supposed to be a simple copy some columns from one tab and paste them on another.
It appears to be functioning, but no values are being pasted.
Private Sub CommandButton1_Click()
'
' To unprotect sheet without password
ActiveSheet.Unprotect
' Copy Over Columns...
Hi everyone,
I'm new here (thanks for having me) and am a novice user of Excel. I'm struggling with what I'm sure are basic looping issues in VBA, and am hoping that someone could direct me to a useful instructional website or perhaps be kind enough to help me get started in loops.
Some...
Hello, I really need some help!
Keep in mind that I use the Record Macro function liberally, so this may have to do with my limited knowledge of actual coding procedures. But here goes my explanation:
In Macro Excel VBA, I've coded into VBA the formulas of SUMIFS functions for each column...
I have a macro, and it is only pulling the one macro to print. The formula is not continuing onto the next one. I'm newer at writing code. I've done this both ways using the Call function and just adding the subs into once macro....
Sub RunAll()
FW
bonbon
End Sub
Sub ShocoChoc()...
My code doesn't like the first line. The name of the tab is correct
Sheets("BOE").Cells("C5:C1015").Selection.Copy
Sheets("Export Load Table").Select
Sheets("Export Load Table").Range("A3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _...
Hey All
I've got a strange one here.
I've a Workbook that pulls in data from Various Sources via VBA, mixes it altogether and then spits it back out in to a new Workbook that will be emailed out.
It works quite well, almost.
As part of the final part of the process I decided it was going to...
Can anyone help me with this code? The range is only selecting 2 cells down from the active cell each time, instead of to the last cell with data.
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1", Range("A1").End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues...
Greetings all, I have a large spreadsheet which copies 100 text files into 100 worksheets, then embeds the compiled data into an email which sends every 30 minutes via a scheduled task. Each time the vba runs I have to stop what I'm doing due to the clipboard being tied up until after the file...
Hello,
First time poster, long time listener. I'm am looking to do the below:
1) Formulas located in A2:S43
2) Copy/Paste those formulas in row 46 (leaving row 44 & 45 blank)
3) Copy A46:S87 (just pasted box), and paste the values and formatting into itself (A46:S87)
4) Loop 1-3 times the...
Hi! So we recently switched form excel 2010 to 2016 (finally) and my macros are now working differently. I assume this may be a known issue, but I haven't been able to find the best info when searching online.
So here is the specific issue:
My macro is performing 3 actions I guess you could...
I am trying to run the following routines in vba for Excel 2013
I want to insert this equation across all my sheets
With ThisWorkbook.Worksheets
.Item(1).Range("C29").Formula = "=NGL(+$A$29,+$B$1,+$B$6,+$B$4)"
.FillAcrossSheets .Item(1).Range("C29"), xlFillWithAll
End With
With...
This code from the Excel Macro Recorder works, and does what I need, but it is not efficient. Can someone please help me and make it more efficient?
Thank you in advance for your assistance!
Robert
Sub Macro1()
'
' Macro1 Macro
'Round 1 Topic 1 Question $100
'
'
Sheets("Setup Page").Select...
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.