Named Columns Being Movable Without Affecting VBA/Macro/Userform
Sep 27, 2008
I have a userform that allows users to review, input and edit data on a spreadsheet. (thanks to Leith for getting me started on it a while back)
I want to be able to assign names to columns so that they can be rearanged in the worksheet without interfering with the VBA/macro/userform.
For instance currently the VBA for the row = "R" (equating it to whichever row the form is currently on)
View 11 Replies
ADVERTISEMENT
Oct 15, 2008
I've attached an excel invoice template I've been making for our company. I'd like to protect all the cells except A12:H42, C8, B9, G4 and I44. The problem is, if I protect the worksheet (with these cells unlocked) then it won't let me run the macro (for inserting new rows for extra products).
View 5 Replies
View Related
Mar 31, 2007
I'm currently using some pretty extensive conditional formatting macros on a worksheet (this functionality is working fine when data is directly entered into the sheet). But when i paste data from another worksheet into my "formatted" sheet, the formatting does not take affect. is there any way to "refresh" a macro?
View 2 Replies
View Related
Sep 9, 2006
I need to make named ranges from an unknown number of columns(at least 1) each with an unknown number of rows. Each column has the name of the named range as the first row, and then a variable number of rows containing part numbers.
I can do it 1 by 1, but id rather do it in a loop so that blanks dont cause errors. there will be different people using versions of this sheet with different model/part number information What i've tried: Count number of colums with row 1 containing data (11 max, which is more than will ever be used) add into array(I know i dont really need to add into the array, but i might use it later for some other code). The problem i'm having is finding the range of rows that need added to the named dynamic range and adding it.
modelcount = Range("G7") 'G7 (for now) contains =COUNTA(H1,I1,J1,etc)
For i = 1 To modelcount
Redim Preserve Models(0 To i)
Models(i) = Cells(1, i + 7)
Range1 = Cells(2, i + 7).Address(xlA1)
lastRow = Cells(rows.Count, i + 7).End(xlUp).Row
Range2 = Cells(lastRow, i + 7).Address(xlA1)
Reference = Cells(2, i + 7).Address(xlA1)
ThisWorkbook.Names.Add Name:=Models(i), _
RefersTo:="=OFFSET(Reference,0,0,counta(Range1:Range2),1)", Visible:=True
Next i
This gets me the range i need, but doesnt create the named range properly. If i go to insert>names>define, the named ranges are created, but they dont relate to the data in any columns. It shows the variable names rather than the cell range the variable represents.
View 2 Replies
View Related
May 5, 2006
I have a data base in a worksheet which is genateated automatically with formula's, I want the a row after the last to be a SUM that moves up or down depending of the amount of the rows.
View 9 Replies
View Related
Feb 20, 2014
I want to do a pivot table with a range a1:j(variable)
The variable row number is held in M2
I would like to do a pivot with range
'Data Input Used for Pivots'!$A$1:$J$[m2]
View 1 Replies
View Related
Sep 24, 2009
I have this list wherein the rows might extend beyound 100.
At AG23&24 i have some comments
Can i somehow implement such that even when i scroll down teh rows this too will be appearing, as we see sometimes navigation toolbars appearing in websites when we go down or move up.
I want to know if this feature can be implemented in excel.
View 11 Replies
View Related
May 20, 2008
I have an xy scatter plot and I'd like a way to put some verticle lines / cursors on the plot. These lines could be moved along the x axis (right and left). Where these lines cross the curve, i'd like the x and y value of the data point on the curve to be given in cells within the spreadsheet.
If this is not possible, is there a way to get the values of the data points in the curve by selecting them. I know you can hover over the data point and it comes up in box, but i'd like those values to be actualy transfered into the spreadsheet.
The location of the data point will vary, so the system needs to be dynamic, i.e, I need to be able to select the datapoint then extract the x and y value.
View 6 Replies
View Related
Oct 20, 2011
I have dynamic named range that lists by columns. I can use this with data validation pull down on my worksheet and all is fine. But when I use this named range in the RowSource of a combo box in a userform, I only get the first column of data, or basically, the data in B1, but not C1, D1, ect. Here is the formula for the named range.
=OFFSET(INFO!$B$1,0,0,1,COUNTA(INFO!$1:$1)-1)
View 2 Replies
View Related
Jan 17, 2007
I have a speradsheet for my work, which gives the user problems and solutions to our website. however I cant get the userform to recognise the named ranges I have added. (ie the first combobox wont recognise the rowsource, which is a named range).
View 9 Replies
View Related
May 7, 2009
I have a range of data that is compiled from various cells that I have named as Range1. I then have another named range - Range2 which should be items selected from range1 and copied into range2. This is to enable other work to take place.
I have created an example userform with Range 1 shown but do not know the code to copy it over using a command button. Range 1 should not change. Also vice versa if possible i.e. remove the selected item from Range2 with another button.
View 5 Replies
View Related
Sep 24, 2006
A textbox on a userform is populated through cell references which have formulas. Works OK. I want to change this by getting rid of the formulas in the cells and have the textbox populated by a name. The following formula is entered in the "Refers To" box =DEGREES(ATAN(RADIANS(ATAN2(Sht1!$G$34-Sht1!$G$33,Sht1!$H$34-Sht1!$H$33)))*(LastDep-Sht1!$G$33))+Sht1!$H$33
The name is "TopLine" (without quotation marks) When I enter =TopLine anywhere in the worksheet, it gives me the proper answer. I have been trying to populate the textbox with "TopLine" but without success. I tried a listbox but that doesn't work either. I have exhausted the search possibilities (I think).
View 4 Replies
View Related
Oct 18, 2007
i have a userform with a text box in it a i would like to display all the values in a named range called "emp1"
View 4 Replies
View Related
Dec 21, 2009
I'm using MultiPage in a UserForm
I have multiple worksheets that can range from: HOLE 1 and go up to HOLE 30
I have other multiple worksheets that can range from: SAFETY 1 and go up to SAFETY 30
When I use the Code below it always goes to the 1st worksheet named either HOLE 1 or SAFETY 1
How can I have it so that when I click on the MultiPage Tab that it goes to the last sheet on the right for each?
Example: If I'm on SAFETY 5 it would go to that sheet, and not SAFETY 1 like it does now.
Here is my
Private Sub MultiPage1_Change()
Select Case MultiPage1.Value
Case 0 'page 1
Workbooks("Workbook.xls").Sheets _
("HOLE 1").Activate
Case 1 'page 2
Workbooks("Workbook.xls").Sheets _
("SAFETY 1").Activate
End Sub
View 11 Replies
View Related
Oct 8, 2013
I'm trying to add a dynamic named range to a combo box in Userform but getting this error.
Have tried several lines of code this being the last that hasn't worked . . . .
Code:
CustCBx.RowSource = Range("CustList").Value
This is the formula for the named range in sheet
Code:
='Customer Info'!$J$2:INDEX('Customer Info'!$J2:$J200,COUNTA('Customer Info'!$J2:$J200))
View 1 Replies
View Related
Oct 7, 2011
I have a formula in column B calculated from column A.
The formula for B is =SUM(A1)
I would like to remove column A while keeping the calculation for column B (I don't care about the formula, I just want to keep the numbers). Obviously, if I delete column A, then column B will show the #REF! error.
Is such a thing even possible?
View 5 Replies
View Related
Aug 21, 2014
Excel 2007 and very new to VBA...
I have a userform (named "QAReviewForm") with a combobox (named "cboSupName"). I want it to populate with my named range "SupList".
FYI, the SupList is found on sheet 2, "Administrative Menu" in column E. E1 contains the heading "Supervisors", and my named range formula is
Formula:
[Code ] .....
When it runs, my form opens and the combobox is there, but nothing appears as options for me to select (yes, I have some values in column E).
View 11 Replies
View Related
Mar 8, 2007
In my workbook I have several worksheets. In worksheet1 I can plot in new users, like
View 11 Replies
View Related
Mar 6, 2009
I was curious if it was possible to have a cell's formatting be altered using the conditional values tool. Example: if(A1=A2,A3=redfont,A3=automaticfont). I know it wouldn't work like that, but it does show what I'd like to happen.
View 2 Replies
View Related
Sep 30, 2009
=(SUMPRODUCT((D6:D300="a")*(F6:F300="MATT")*(J6:J300)))
Count all A's that are also Matt and add up the corresponding figs in J. If use the formula above to 179 (where there are values in the cells) then I get the answer 170 which is correct. Currently with the it set to review all cells from 6 to 300 which includes blanks then it returns #value therfore I assume it is not coping with the blank cells.
View 4 Replies
View Related
Sep 28, 2009
delete rows without affecting formulas
In general, when you write a formula:
In Cell A1:
View 7 Replies
View Related
Jan 28, 2009
I have a countif formula on another tab collecting data from these cells. I want to define a combined name DecBestFL with cells A1:A14 and G1:G14. Can I do that in Excel 2007?
On the other tab I would use =countif(DecBestFL,G5) G5 = "Y"
View 9 Replies
View Related
Nov 7, 2006
I am using the following Selection_Change Event to show a UserForm when a cell in 1 of 31 named ranges is selected.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Dim i As Long
For i = 1 To 31
If Not Intersect(Target, Range("StatPost" & i)) Is Nothing And Target.Value = "" Then
If Target.Offset(0, -8).Value = "" Or Target.Offset(0, -7).Value = "" Or Target.Offset(0, -6).Value = "" Or Target.Offset(0, -5).Value = "" Or Target.Offset(0, -3).Value = "" Or Target.Offset(0, -2).Value = "" Or Target.Offset(0, -1).Value = "" Then....................
View 3 Replies
View Related
Jan 19, 2014
Was just wondering if it was possible to 'split' these cells (highlighted in the link below) into 2 columns without affecting the layout of the invoice.
[URL]
View 12 Replies
View Related
Dec 28, 2007
I want to be able to sort a table alphabetically by one column after adding a new row to the bottom. But there is another table that uses the values of the former table. How can this be done without screwing up the formulas in the second table.
View 5 Replies
View Related
Nov 22, 2006
Anyone know code to count columns in a named range? Got some code that i want to utilize for multiple things so i cant hard code the column count in anymore.
Dim intColumnCount As Integer
Dim X As Integer
x=0
Range("Poo").select
intColumnCount = magic voodoo code
For Each cell In range("Poo")
x = X+1
If ((x / inColumncont) > 2) And ((x / intColumnCount) <= 3) Then 'if on actual row
If IsDate(Cell) Then ' if there is a date in actual
Cell.Interior.ColorIndex = 15 ' shade actual gray
Cell.Offset(-1, 0).Interior.ColorIndex = 15 ' shade prom gray
Cell.Offset(-2, 0).Interior.ColorIndex = 15 ' shade Sched gray
End If
End If
If x = (intColumnCount*3) Then 'went thru Sched, Prom, & Actual
x = 0 ' Reset x
End If
Next
left off a bunch more if statements that formats other stuff but u get the idea... Need Magic Voodoo code replaced with working code
View 3 Replies
View Related
Sep 17, 2007
I have a dynamically named range the contents of which I want to clear. However, I also want to clear the cell contents in the next column beside the range. So if my dynamically named range is A20:B40 can I clear the contents of A20:C40 without changing the initially named range. Background: The data I have is the result of an advanced filter. The range is named for printing purposes without the final column.
If I then change one of the raw data I want to run the filter again. To do this I need to clear the first filter.
Range("AIT_Change_Management").ClearContents
View 7 Replies
View Related
Apr 29, 2008
I am trying to hide columns within a named range, where the range corresponds with the values section of a pivot table.
My code hides an unexpected set of columns. It seems to be affecting a different range, depending on the number of columns in the pivot table, which is not part of the named range, as if there was some kind of offset.
Sub hideAll()
With ActiveSheet.Range("wholeyear")
.Range(.Columns(1), .Columns(12)).Hidden = True
End With
End Sub
View 5 Replies
View Related
Jan 19, 2014
how to highlight entire rows within a spreedsheet based on the information in a cell. I have gone to the conditional formatting and done:
=$A4="Needs Labs" and formatted that red, but when i go to note what areas it applies to, It will not highlight the row. I use the wizard box to decide where to apply the formatting like I saw on an online tutorial and dragged across the row, but nothing happened.
View 4 Replies
View Related
Mar 26, 2014
My workbook operates in full screen mode simly to make it looks a bit nicer. I have some + - buttons that call a macro to change the scale of the axes of a chart (sort of a zoom effect). For some reason, whenever I run these macros my workbook exits out of full screen mode.
Here's an example of the zoom code:
ActiveSheet.ChartObjects("Chart 115").Activate
ActiveChart.Axes(xlValue).Select
ActiveChart.Axes(xlValue).MinimumScale = 200000
ActiveSheet.Range("a1").Select
View 2 Replies
View Related