I have the below line of code as part of my VBA .
As shown below, the first "find " section looks for the word "Paris". When it finds the work Paris, it updates the cell value as France and then moves on to the 2nd "find" section where it looks for the word "London and then updates the cell...
Hi guys here is the 2 macros I have for this issue. The first one transforms one row from into 4 different rows and the next one removes the rows that have a zero. This way seems to crude and I was wondering how would I improve it. I'm thinking arrays and ranges probably? Thanks a lot
Sub...
What is a less rigorous way or writing this?
Sub COSTPLANBREAKDOWN()
Dim rngstart As Range
Dim tst As Range, lastrow As Long
Dim cl As Object
Dim L As Long, strcells As String, lsr As String, toplvl As String, comm As String, flat As String
Dim CLT As String, PLT As String...
Hello everybody.
I am wet behind the ears with VBA/macro's in excel.
I have a spreadsheet that I use to input information, but I want to copy specific rows from that "active" sheet to other sheets based on the values in the cells of colume"b".
The rows will be copied to different sheets based...
Sub BO_ID_Prep()
Dim rng As Range
Dim i As String
For Each rng In Selection
i = i & rng & ";"
Next rng
ActiveCell.Offset(1, 1).Value = Trim(i)
ActiveCell.Offset(2, 1).Select
ActiveCell.FormulaR1C1 = "=LEFT(R[-1]C,LEN(R[-1]C)-1)"
Selection.Copy
ActiveCell.Offset(1, 0).Select...
Good morning everyone.
I have a userform that shows multiple options, for example 12 checkboxes for the month, 4 checkboxes for categories and some radio buttons here and there.
I need to be able to choose one or more months, one or more options and then press go and have it look into another...
Hello,
I have a VBA code that I had made, but having a difficult time making a table from it. It has to be from a current selection, instead of A5 as it is never in the same cell in each workbook. Can someone help me?
Sub template()
'
' template Macro
'
'
ActiveCell.Select...
Hi Gurus,
Looking for your help to fix my code below, what I am trying to do is to update my table vertically, instead of horizontally. Just to clarify, I was updating my data like this:
<tbody>
A
B
C
D
E
F
G
1
2018-30
2018-31
2018-32
2018-33
2018-34
2018-35
2
Open
27
26
25
27
28
30
3...
Hello, I have this Macro and I need it to repeat until there are no more lines. the tricky part is that the macro creates 6 new rows each time. also how can I make it delete the rows with zero balance?
thank you
Sub Create_Rows()
'
' Create_Rows Macro
'
' Keyboard Shortcut: Ctrl+q
'...
Hiya,
Thank you, in advance, for your help.
I currently have a macro that identifies unique data, based on cells "B"-"D". As the macro loops, it pastes the unique count number into Column "AL". At the end of the section, a MsgBox appears with the total unique # and 25% of that #. ( This then...
Hello,
I have some data that I want to color once a button is clicked. I want it to go to the next cell and stop once the cell contains an empty string.
Here is my code:
Private Sub CommandButton1_Click()
Dim C As Variant
Range("A1").Select
C = ActiveCell.Offset(1...
Hello everyone,
I have recorded a macro and it works fine.
I have 18 sheets that are numbered 1 through to 18.
I would like this macro to loop through each sheet from 1 to 18 as I will need to extract data from each sheet about 4 times (I can change the range(D25) each time I run it.
Thank you...
I have my Macros working well but need to make it paste a formula in the active cell. I've looked at several posts but have only become more confused. Still a newbie - I've mastered copy/paste and slight tweaks but this is confounding me.:confused:
My formula to include is...
Hi, I'm getting an "Else without If" Error message from the following code. The last Else is where the error points to. I have 2 If's, 2 Elses, and 2 EndIf's, so I can't figure out what the error is. Can you please help?
Sub Assign_Zero_Or_One()
Dim r As Integer
Dim n As Integer
r = -1
n =...
Hi all, I'm currently trying to make a macro which autofills a Vlookup from another workbook.
I managed to get most of the macro working, except that it would't autofill to the rest of the empty spaces in row BA no matter what I tried. It was to only be the empty cells under the filters setup...
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...
Hi all,
I have a VBA code that has worked for the last 2 or so years but for some reason has decided to not work now on some computers. I have refrained from installing updates on my excel for this reason for approximately 6 months since the update in Sep / Oct created other issues.
Attached...
Hi guys, the following macro seems to run a little slow, is there anyway of making the code more efficient / run faster ?
Sub Adjust()
'
' Adjust Macro
'
' Keyboard Shortcut: Ctrl+a
'
Dim lr1 As Long
Dim lr2 As Long
Application.ScreenUpdating = False
Range("A2:AQ" &...
Hello everyone, I have an issue during the autofulfillment of a table, with the following code that triggers an infinite loading time, it reaches 100% and then loops again to 0%, it's really frustating. The columns only has about 2000 rows?
With ActiveSheet.ListObjects("Table2")...
Currently I have this code that with the support of conditional formatting, is able to detect all duplicates, but makes them have the same exact color. This is a problem because I have a gigantic table and looking at everything with the same color.
Range("Table2[[#Headers],[Plastic...
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.