in excel 2007
i want to be able to enter a single cell address then execute some code. here is what i have tried.
Dim MyCell As Range
MyCell = InputBox("Enter Beginning Cell i.e. A1")
Range("MyCell").Select 'this is where the error occurs
In Excel, I have a macro that formats all of my PageSetup stuff. I would like for the macro to prompt me to input a title in the .CenterHeader. Is this possible? Here is the code for the macro as it is now.
Sub PageSetupLandscape()
With ActiveSheet.PageSetup
.PrintTitleRows =...
I want to replace MyName with the tab name of the active sheet in the following code. How is this done?
ActiveWorkbook.SaveAs "G:\Procurement\CXB\07 Vendor forecasts\" & MyName & Format(Date + 3, "yymmdd") & ".xls
how do i make a file read only for everyone else but me? Here is the code i used.
ActiveWorkbook.SaveAs "G:\Common\A A Never Out Reviews\" & Format(Date, "mmddyy") & ".xls", FileFormat:= _
xlExcel9795, Password:="", WriteResPassword:="", ReadOnlyRecommended:=True
if i put in a password...
I have a hyperlink field in a table called Photo I want the user to be able to fill in this field on form by browsing for the file that holds the picture. The user could type in the path but that is fraught with opportunities for typos, so I would like for the path to automatically populate the...
I want to count the number of times the value in cells T251 through AE251 is grater than the value in cell L251*2. The formula below returns Zero when I want it to return 1. The values in T251: AE251 are as follows.
2 32 10 6 8 5 12 9 5 10 7 3
L251*2 = 30 or 15 x 2 = 30
The...
I have the folowing code in a macro:
Range("M2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC1,MRPDet,8,0)"
The problem is that sometimes the data in not in column 8. It could be in columns 6, 7 or 8. How do I compensate? The named range for the column I want to use is called Sales_Order.
I want to use a date that is 100 days from today in a maco. I tried something like:
Dim myDte As Date
Set myDte = "=(Today() + 100)"
but that of course that doesn't work. I want to use this date to find dates that are greater than 100 days from today and delete that entirerow from...
In Excel I have autofilterd in column J and I want to count the number of times "M" is in column F. In other words I need something like Countif visible range = M. It's probably easy but I haven't been able to find an example.
I have a range that I have used a conditional format to color the 3 lowest values in each row. lowest is green, next lowest is blue and the third lowest is yellow. Now I want to count the number of green cells in a column to find out how many in that column have the lowest value. Is there a...
In Excel. I have a range where I want to change the color of a cell that contains the minimum value in the row. I tried using a min function forumla in a new column and using the cell value equals comparison in Conditional Format but that only works for the one row. Help.
How do I make this not case sensitive?
Sub InsertRow()
Range("a2").Select
Do Until ActiveCell = ""
If ActiveCell <> ActiveCell.Offset(1, 0) Then
ActiveCell.Offset(1, 0).Select
Selection.EntireRow.Insert Shift = xlDown
Else...
I am trying to put a list in the page footer using & chr(10)&. Here is my code. What am I doing wrong?
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "&""Arial,Bold""&14PO Price Variance"
.RightHeader = "&D"
.CenterFooter = ""...
I have a macro that adds a comment to a cell near the end of my spreadsheet. The only problem is the comment box is placed somewhere halfway up the spreadsheet out of sight of the cell it is tied to. How does Excel decide where to place the comment box and how do I get the box positioned next...
I am trying to write a macro that will count the number of times an item in ColA repeats,return that value in ColB then delete all of the rows except for the first row for that item.
ColA ColB
71699 18961-1
71699 18962-1
71699 18963-1
71699 18964-1
71699 18965
71699 18966
Results...
There is a specific cell "J2" in a worksheet from which I would like to extract a string to automatically become the Report Header for that worksheet. Is there a way to do this? The string is from the left to the first space encounterd in the cell.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.