I created a very small macro in excel but it is not working exactly as I want to. I have few buttons which have a comment assigned to them. When I select a random cell and click the macro button it should add the comment that assigned by the button.
What I was able to create is when I click the button, it asks me for the cell number, this was the only workaround I could do.
Hope someone can help with this - Please can I have some VB code that will select all rows in columns H2:M2, when I don't know each time where the last row will be? I'm guessing this is a dynamic range, but not sure!
This will be an easy on for you seasoned programmers. I want to find the last used cell in a column, and then select an offset range based on the location of that cell. For example, in the attached workbook, I have a button at the top that activates a macro to add a new week to my time sheet. This simply copies the contents of the current week, and adds it at the bottom.
What I would like to do next is clear the data from the newly added cells, leaving the formulas in columns A, B, C, J and K. In the attached example, I have just added Week 3. I would now want to locate the last used cell in Column C, (C24), then offset from that cell to select the range D18:I24, and clear the contents of those cells.
I need to select data starting from cell 16B until 16K until the end of excel file... i will use this to export data into database later... I have attached a sample excel file with records needed to be selected
I have a workbook with rental properties containing 2 sheets. 1 sheet with the general details and the rate sets and 1 sheet where I'm trying to calculate the total price for a period of time between 2 dates. I would like the people who use this workbook to simply enter the dates and get a price based on the amount of days within a rate set.
eg: 1 to 7 days is weekly, 8 to 31 is monthly etc. To display this, I'm using: =LOOKUP(H3,{0,7,30,180,365;"daily","weekly","monthly","6 months","yearly"})
These rates are different for each property, and this formula isn't exactly dynamic; it just displays which rate should be used.
Now my idea is to use IF/THEN kind of a formula, but I'm lost on how to do this. The actual rates are on the other sheet in separate rows and columns belonging to the appropriate property. Also, the rates as they are will probably need to be recalculated to a daily number before it can be used for the price calculation, because a month has either 29, 30 or 31 days.
At the moment the daily rate is diplayed as a daily rate The weekly as a weekly rate The Monthly as a monthly rate The 6-Monthly as a Monthly rate (with a minimum of 6 months of course) And the yearly also as a Monthly rate (with a minimum of 12 Months)
I've attached the sheet as a reference : Property details import.xlsm‎
I need a macro to start at cell A11 and select across 10 columns and down to the Lastrow (last row with any data).
There are hidden columns after column D so it CANNOT have any columns hardcoded except for column A.
This selection then needs to be set as a single print area to print out on 1 page. I have already set Rows 1-10 as a title area to print at the top of each page.
Code i currently have is:
[Code] .......
I just need it to now go across 10 visible columns and set as a single print area.
I am having issues with a VBA script. The Spreadsheet is linked to a SQL DB and updated with data from scripts that are executing throughout the day. This is then fed to a dashboard. We have a Baseline that shows in the Date column as 0/0 and 1/1. I need a way to ensure that the 1/1 is always in the last row of the chart so the baseline shows across the entire range of dates. The current method is to declare a variable and add 1 to it whenever we iterate through the sort for the other dates. However everyday the 1/1 baseline column ends up further to the beginning until it is next to the 0/0 in position 2.
So I am trying to find a way to have the macros find the last row of the Date field and then set the position to be equal to the last row.
I require code to identify the last row in column 'A' that contains data, and then to select every row up to that one, and each column up to 'H'. My data begins on row 3, and the rows with data varies from row 7 through 120. The columns with data is constant so there is no need to test in that direction.
I have a range of data in columns A2 to Mx. The length of the columns varies, and all cells are not always populated. I want to be able to select the entire range, no matter what its length, no matter how many cells are populated (as both of these will vary on each tab) However, I do not want to select A1 to M1 as this is column headers which need to be excluded from the data for compliation purposes.
Is anyone aware of some way to use the " dynamic named range approach" to only select the cells with numerical values in a column and name this range?
I've looked at the examples on this site but can't find any solution to this particular problem although I have a feeling that this should be possible.
I'm wondering if it is at all possible to have a cell comment automatically update depending on what data is input in the cell (via user input, VLOOKUP, etc.)?
For example, if cell A1 contains the text "CHARLES" with a comment saying "Employee of the Month", and is then subsequently updated with the new text "JOHN" (again, via direct input, a VLOOKUP, data validation, etc.) is there a way to have the comment automatically update to say something else, such as "Team Lead" for example?
I've considered using VBA to accomplish my goal, but am unsure how to compose an effective code to do so. I've also considered perhaps creating a named table filled with all the different comment possibilities I would like to have used in this cell and then inputting a formula in either cell A1, or the comment contained therein, that would then call the corresponding text from that table based on the data in cell A1. Honestly, I'm not sure that what I'm trying to do is even possible;
I paste new data into a sheet of a monthly report I prepare. For this sheet, the # of data rows change (and is unpredictable) every month. I need the value inside a specific cell that dynamcially moves up and down based on the # of rows for that month (because it's below the rows of data).
So I made a formula to identify the exact cell # every month.
Example:
This month the exact cell is F255 in the "Refi" sheet.
So my formula in the "Summary" sheet cell A1 first finds the cell row # only (255) and since it's always column F, in B1 I have
VB: ="F" & (A1)
This outputs "F255" in B1, successfully identifying the target cell.
Now how do I write a formula in C1 to grab the value from whatever cell is named in B1. (For this month, the value in cell F255 from the "Refi" sheet)
I need to create a dynamic range based on cell between a header and footer cell. The header cell ( A8 ) will remain static, however, the footer cell starts at A10 and then will move down as rows are added.
I have a range which will change in size & in content, & I want this to be a Named Range at whatever size it is.
Reason I want to is because I want to make a Validation List with this dynamic range. I also want a Validation list which lists the content of 2 or more dynamic ranges which may or may not be on the same worksheet - is this possible?
i.e. First dynamic range: called "Milestones" at A11 Second dynamic range: called "Activities" at A25 & make a Validation list that will list content of both
cell A1 is equals to B1 because the cell C1 contains the number 1. Now if i change the value of the C1 to 2 how can i make the A1 shows the value of the B2 ?
The "Nursery" Worksheet I already have code that puts the Auto-Sum amount below the last data row in the column named "Nursery Grand Total" in the Nursery Worksheet.
This Auto-Sum amount, however, will always be in a different row because the amount of rows generated from the report is always different as well, therefore, the Auto-Sum cell/row changes with that to be right below the last data row in the "Nursery Grand Total" Column.
I would like to copy (values only) the amount from this dynamically changing Auto-Sum cell and paste it into another worksheet named "Totals".
The "Totals" Worksheet In my "Totals" worksheet, I have two columns. "Master Total Description" and "Master Grand Totals".
In the "Master Total Description" column, I have a cell named "Nursery Grand Total" which is exactly the same name as the header row in the "Nursery" worksheet.
So,
In the "Nursery" worksheet/"Nursery Grand Total" column, I would like to copy the auto-sum amount
and paste it into....
the "Totals" worksheet/"Nursery Grand Total" row/"Master Grand Totals" column
I would like to replace the blue bit of this Dynamic Named Range (DNR) with an INDIRECT formula in order to modify the starting point for the DNR: =OFFSET(DATA!$C$60,0,0,20,1). Unfortunately, I can’t seem to get my INDIRECT formula to work in order to use it to replace the blue bit above: INDIRECT("'"DATA"'!&ADDRESS(MATCH('SHEET1'!AC8,DATA_Date,0)+22,3)"). The orange bit of the formula above returns a value of 60, therefore the ADDRESS formula should return $C$60, that can then feed into the INDIRECT and act as the equivalent of DATA!$C$60. But it doesn’t.
I have a question on the above but can't seem to find a solution. There are two ways that I can find for dealing with dynamic lists via data validation:-
1) Offset and match, cavet being the data must be sorted a-z 2) Have lists for each potential selection
Is there any way to get around 1 without having to do 2? E.g. Got two columns of data, unsorted, and a list from which the user can choose from. The user chooses from the list in first cell, in the second cell require the dynamic list to return all the values accordingly?
I have a dynamic table which is linked to a couple of charts. The table must remain dynamic.
I needed to add two new columns to the table, "Focus Area" and "Category". I need a drop down list in the "Category" column to be dependent on the item selected from a drop down menu in "Focus Area".
I can get the first row of the dynamic table to do this.... however; subsequent rows all lock the drop down list in the "Category" column to the same choices regardless of what is chosen in the "Focus Area" list.
Is there a way to make dynamic drop downs within a dynamic table?
I have made the macro that does as ,soon as i open the file, select today's date but only if date is in sheet5... sheet 5 is may so it works. Doing the same job for every sheet in the file.
I am using 2010 and want to select a range starting at the same cell all of the time (regardless of whether or not it has contents - so let's say B7. Starting at B7, I want the range to include all of the columns starting at B and go to the end of all of the columns. Then I want the range to include all of the rows starting at B7 and end at the last row. I will eventually copy this range and paste it on another worksheet start on a specific cell of another worksheet. (Perhaps, we can add a name to this range).
I have a matrix with numbers that each cell is composed by a function of two parameters (two columns). The formula is
"=COUNTIFS(T2:T99,"15",V2:V99,"14")",
So it's counts when in one cell column I receive 15 and in the other 14. For instance, I receive the number 3 - so I have three rows that match (the first column with 15 and the second with 14).
I want, when I select the cell from the matrix (table) with the number 3 (that I receive from the formula) it will highlight the relevant rows..
I'm trying to build a dynamic formula where a cell reference shifts one column over when a certain percentage changes. It's hard to explain, but the attached workbook should make it clear what I'm trying to accomplish.
I need a dynamic formula which if hard-coded would be something like =(tabname!A7). But instead of A, I want a calculated value such as ($C$2*12+1). My columns are numbered, so I want to say "the 26th column along", "the 37th along" etc, as C changes. I tried the index formula but couldn't get it to work, assuming it is even the right one.
Q: How can I point excel to the begining value cell if I know the ending value cell and the nubmer of cells to move to get there?
More details:
I have an investing sheet that I need to calculate the CAGR (compound annual growth rate). The formula is (ending value/begining value)^(1/number of years)-1
The number of years can vary but the ending value will aways be in the same cell. I am using a count to see how many years have been entered.