I would like to modify this formula in a macro so that it always looks at a specific column reference (column K)
ActiveCell = "=SUM('Review Tab'!K:K)"
I've changed it to this:
ActiveCell = "=SUM(INDIRECT(" 'Review Tab'!K:K"))"
However, VBA now thinks that everything after...
I have this value (95551092 - ) in the activecell and I would like to add whatever value is in cell A50.
I do have the following code which adds the value but it deletes the spaces and then moves the hyphen in front of the numbers.
Dim d As Double
d = ActiveCell.Value...
I have a sheet that represents a score card for a sporting event. Row 3 contains the dates of the game, row 4 contains the day of the week and row 5 contains a ‘points’ heading. The remaining rows contain the scores of the games and the team name
Row 3 contains 01/01/19...
Hello: I'm trying to avoid using the Select method, so I'm trying ActiveCell. But I've heard I should try to avoid using ActiveCell as well. :confused: Any ideas on firming up this code?
Here's what I have:
Range(Selection.End(xlToRight), Selection.Offset(0, 7)).Select...
Hello to everyone
I have this situation
In Range(A1:A6) i put some values.
My activecell is A7.
I want to know which is vba code to select Cells from the top rows of activecell(including activecell) until i find a blank row.
As result Range(A3:A7) will be selected.
Thank's a lot
Beginner at VBA here. Was wondering if someone could simply explain to me what the differnece is between:
If ActiveCell = " " Then ActiveCell = 0
If ActiveCell = '' Or ActiveCell = " "
Then ActiveCell = 0
This code copies the value of combobox1 and puts it in the active cell
when the command button is clicked.
Private Sub CommandButton1_Click()
Dim str As String
str = ComboBox1.Value
ActiveCell.Value = str
If I have checkbox1 checked on the userform containing this code, I want the...
I want to duplicate the active cell to specific cells on a calendar and everything seems to be right but my code as is does absolutely nothing. I added in a msgbox just to make sure that it is picking up the value of the active cell and it is however it cant seem to print it in the other cells...
Any ideas why this formula won't work in VBA but will in the worksheet? The responses tab exists. How should it be updated? THANK YOU!
ActiveCell = "=IF(VLOOKUP(E2,Responses!E:R,8,FALSE)=0,"",(VLOOKUP(E2,Responses!E:R,6,FALSE)))"
I have the following VBA Code Snippet and I've trying to learn how to use the Cells object.
How would I replace the Activecell object with the Cells object in the Do Loop?
In this instance, the Active cell would be Cells(2,2).
What confuses me is how to replace the activecell object with...
...Is there any way to do this other than creating many separate Sheet locations to store unique comments?
Each time the user returns or moves to ANY cell with pre-entered comments, the Userform listbox or textbox would reflect those Comments for that particular cell, displayed in a list ?
The following code from one of the recent posts perform the task of selecting the cells starting from column A up until actively selected column.
These will select all cells in between. However I would like it to select column A and active column only, hence leaving the adjacent cells in...
I copied the code below from a website and it works fine and I got an idea what it does. But I tried to understand what "ActiveCell" returns. So I did the following in the immediate window
and I got the "Hi" which is the content of the cell A1 that is selected? if that is the...
I'm still quite new in this and struggling with a macro for staff data input. I have an input box on the first page and I want to save the first few inputs on the first page and next few on second page, but to match the record for the same person. I hope I was clear. Can you give a...
Happy Holidays and thank you in advance for you help. I have a macro I use to identify a unique count for patient names. The goal of this macro is to apply a number to each unique name/dob combination. I have another macro I use to choose a randomized list of numbers within the range of...
Can anyone help with the following code, I am trying to get the macro to group the rows from the end of a list of data in column A (the end will be different each time the macro is ran), down to row 858, which will stay the same each time. What do I replace A135 with to make the macro...
I am trying to export data from an xlsm to a new xls.
But the problem is that it only copies the first row and I need a table to be copied.
My macro is this one:
If Sheets("Import").Activate Then
Thank you for my previous problem.
I have small problem for selecting total column form Active cell I writ blow Code but it working I get this error "Run time error '1004'
Range("ActiveCell", Range("ActiveCell" & Rows.Count)).End(xlDown).Copy
Please help me