What Is The Code For Number Of Used Columns
Aug 4, 2012
i am using the code
activesheet.usedrange.columns.count
to get to know the no of columns used in the data set in a worksheet. bt the problem is it is count the unnessary columns which are not part of the dataset too.
View 9 Replies
ADVERTISEMENT
Dec 21, 2012
I have letter and number combination code in two collumns and they differ for 10.000 numbers:
BAM98314
BAM88314
BAM90000
BAM80000
As you can see the left code is for 10000 numbers higher. the letters are allways the same. In the event that this isn't so, if difference between codes in same row is more or less than 10000 numbers. I was thinking on making conditional formating so the cells with wrong difference would be marked red, but I do not know how to make formula for this difference.
View 2 Replies
View Related
Nov 23, 2009
is it possible to have boxes for numbers to be inserted into
i want the user to be able to fill in bank account and sort codes numers into the relevant individual box for each number
View 9 Replies
View Related
Mar 1, 2014
I work on a daily basis with spreadsheets in excel. The number of columns is the same, but every single spreadsheet has a different number of rows. I recorded this macro in a table with 1196 rows and I would like to use this macro also in other tables with a different number of rows.
Sub City2()
'
' City2 Macro
'
'
Selection.Copy
Cells.Replace What:="POMPANO", Replacement:="Pompano Beach",
[Code].......
View 12 Replies
View Related
Dec 3, 2008
What If we had to replace any number..
Lets say, if we had to seperate NUMBER TEXT NUMBER in different combinations....
B2 contains values like these then
TOM CRUISE 12
TOM 5879 CRUISE
TOM CRUISE 123456789
123456789 TOM CRUISE
123 TOM CRUISE 456
[ = SUBSTITUTE(B2,"1234567890","") ]
I am at my wit's end pondering over it?
How to make the SUBSTITUTE function work for each individual digit?
View 11 Replies
View Related
Jun 25, 2014
I am attempting to build a mileage tracker based on a master list of code numbers. After submitting the date in cell A, in the next cell, B, I would type a code number from the list, say 7. Seven is the massage parlor that is 15 miles away. So 15 would come up in the next cell C.
View 3 Replies
View Related
Feb 26, 2014
Is there a way to write a macro that will insert a column into another workbook at column C, then put a formula into every row of that column (down to the last row) that will basically be the equivalent of "sum the thirty columns to the right within this row"
What I need to happen next, is that the code repeat this process of summing 30 cells to the right, (or inserting a formula that will) all the way down to the last row. Then copy that data, paste it into Column H of the workbook containing the macro. Then close the other workbook without saving the changes.
I can't simply do something like, =sum(D6:AH6) ,because another department keeps inserting a new column in front of column E every day. So, if the ending column is locked on a particular cell, the sum range will grow by 6 every week. I simply need to get the sum of D6 and the next 30 columns to the right of it.
The code I'm requesting should sum the 30 columns to the right of column D (beginning at the 6th row, then down to the last row), or insert a formula that will do this, and drag the formula down. This action will be done in another workbook.
View 1 Replies
View Related
Nov 10, 2013
For the spreadsheet below I need code to determine what rows to add for the subtotal for each week for each person listed. The rows will vary each time.
Week: WK1
Visit
Date
OMR
Pay Item
UM
Rate
Start
Finish
Time
Subtotal
10/25/13
GA
RG
H
0.00
35
0.00
Totals for WK1: 0 Visit / 2 Admin
[Code] ....
View 1 Replies
View Related
Jun 9, 2014
I have a table with row headers (in column A) and column headers (in Row 1). Throughout the table there are 1's and blanks depending if the column is applicable to a particular row or not.
I want to write a VBA macro to do the following:
1. Do a Vlookup of column A for a particular user input text string.
2. Only show the row that matches the text string.
3. Only show the columns where there is a 1 associated with the selected row.
Then once that is done I need a separate macro to return the sheet to show all the rows and columns.
View 8 Replies
View Related
Jan 2, 2012
know a macro code to add 3 columns after each different Item.on my spread sheet.
1ABCD
2Item
3111
4111
5111
6111
7111
8111
9112
10112
11112
[code]...
View 5 Replies
View Related
Feb 9, 2012
I need some VBA code to hide columns in spreadsheet when run. Basically, in row 7, I've entered HIDE in the columns that I want to hide when the macro runs (i.e. columns F,J,H,I,K, O,P,R).
View 7 Replies
View Related
Mar 28, 2012
I have many workbooks where Cols B and C and G and H all need to be trimmed of extra spaces, then concatenate B and C into Col D with a space between, same for G and H into col I. (If you hadn't guessed, these are first name and last name columns which need to be combined into one name.)
I have been doing this manually, inserting extra columns, copy paste special values, then concatenate, copy paste special values?
View 6 Replies
View Related
Jul 25, 2013
Below code isnt working for "5 Metre", columns dont hide from row 24 down.
My A10 is a drop down where i select 5 or 6 or 7 metre. If i select 5 it only hides rows 22 and 23.
I think the 2nd and 3rd lines marked red are stopping the rows from hiding!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$10" Then
Rows("22:40").Hidden = (Target.Value = "5 Metre")
Rows("24:40").Hidden = (Target.Value = "6 Metre")
Rows("26:40").Hidden = (Target.Value = "7 Metre")
End If
End Sub
View 2 Replies
View Related
Jan 27, 2014
I need to perform an action (unhide all columns) whenever I switch to a different worksheet.
Detail: I have a file with 2 tabs (worksheets). Tab 1 contains daily data, and when people are done with the current week they group and hide the columns for that week. This allows them to only view the new week and do an easy copy/paste into other applications. Tab 2 totals up the daily data from Tab 1 and shows monthly totals. The problem is that when they hide Tab 1 columns for past days, the formulas in Tab 2 don't "find" that hidden data. I would like to write a basic code that unhides all Tab 1 columns when I switch to Tab 2 so the formulas on Tab 2 reflect accurate totals. My thought is that it would be Worksheet code on Tab 1 using "Deactivate". I've tried to piece together different bits of code but can't get anything to work properly. I don't want them to have to run a macro or click a button, I'd like it to be automated when they switch tabs.
View 3 Replies
View Related
Feb 14, 2014
VBA code that can highlight all columns except ones highlighted?
View 1 Replies
View Related
Oct 21, 2008
I wanted the title to be " Dynamic Row And Column Index In Macro" but I wasn't allowed to write it so. However, I have macros where I write things like:
.Cells(138, 13).Value = Something
Now, if I add rows and/or columns in the worksheet, (138, 13) might not be the coorect coordinates anymore.
View 4 Replies
View Related
Jun 27, 2006
I have a worksheet that I use to track my clients and their meal selections over a five day week. Col A is their name, B is their shift (am or pm) C is their table number, D is whether they will attend that day (yes or no) and E is their meal choice (a b or c) Columns D & E repeat the same information for each day Mon-Fri.
I would like to have a print button so that on a daily basis I can print the clients name and thier meal selection (only those those who have a yes for that day) separating AM shift from PM and then grouping them by their table number rather than alphabetical order.
View 2 Replies
View Related
Dec 11, 2006
I am trying to color code the cubes in my chart. I'd like to be able to be able to specify a specific color per cube. What code what I write for the Sheet to do this?
View 5 Replies
View Related
Feb 4, 2008
I am trying to hide four columns on my worksheet, but for some strange reason I am getting the following message:
"Run Time Error 1004
Unable to Set The Hidden Property of the Range Class"
I have no merged cells or objects in those columns. Has anyone else suffered this problem?
View 9 Replies
View Related
Apr 18, 2007
For example, Column D, Rows 2 - 500 contain different number codes:451
461
593
675
I want to match up the number code and replace it with the Course Name.451 = Course A
461 = Course B
593=Course C
675=Course D
I am looking to have the number code, i.e., 451 replaced in Column D with the Course Name, Course A or the Course Name appear in Column E pulling from the number code.
In the end I will probably have 100 unique number codes to match up with course names.
View 9 Replies
View Related
Feb 15, 2014
I have a data sheet and I usually copy manually the values from different columns. I would like to paste them into another worksheet so that when I paste the values in Column A, I should not surpass Row100, and if so then the code should automatically shift to column B and start pasting. This should apply to all the columns till column F. Once column F is full till row100 then the procedure should start again from column A.
View 4 Replies
View Related
Jul 31, 2014
with a simple code that could:
If column K2:k466 is blank or says "No" then columns L & M are hidden. If it says "Yes" it is not hidden.
Also,
If Column N2:N466 is blank or says "No" then Columns O,P,Q,R are hidden. If it says "Yes" they are not hidden.
Finally,
If Column V2:V466 has a zip code (or number) then columns T,U,W,X,Y,Z,AA,AB,AC are present. If there is no value in any of V2:V466 then they are hidden. .
View 12 Replies
View Related
Feb 10, 2014
Currently, Columns EFG are grouped.
I have a userform with checkboxes. With the click of check box, i would like for it to do the following.
If checked, it will expand the group. If unchecked, it needs to stay collapsed.
Here is an example of code i currently have and is not working.
[Code] ......
View 2 Replies
View Related
Feb 27, 2014
I have the following code to go through various values in a column and colour code them. However I am facing two issues here:
1. I need to generalize the code such that it runs through column G till column S in different worksheets
2. Few columns between G and S do not have any data and the code is getting stuck at the line below:
myResult = WorksheetFunction.Average(Range("G:G"))
View 1 Replies
View Related
May 10, 2012
I have a data in Coloumn "A":
12345678910
I need to Convert the Data in B1 Like
1;2;3;4;5;6;7;8;9;10
the No of Columns may increase, but i should get a data till where the data is in Coloumn "A" ends.
View 9 Replies
View Related
Jul 21, 2008
I have a spreadsheet with 20 or so columns but that number can change at any time. I need my code to by dynamic so if a column is deleted (or added) my code will still work.
Each column has a name in row 2 and I'm trying to use that in order to make everything dynamic. For example, my code counts the number of blue cells in colums D4:G68, but now if someone adds a column before column D, everything gets messed up and it will still count the cells in D4:G68 but I want to use E4:H64 now. Does that make sense? I have made code that searches the column names and returns the column number to correspond to the name. How would I change this?
Range ("C8") = "= CountBlue(E4:G68)"
the code doesn't look exactly like this, I believe it is actually in R1C1 format
View 9 Replies
View Related
Oct 24, 2008
I am trying to write a VBA code in excel to delete any columns when a cell in that particular column = 0 (zero). That cell would start at B19 and subsequently follow to C19, D19 and so on.
View 9 Replies
View Related
Jan 10, 2009
I have a sheet which is a reconciliation exported to excel from our in house system, what i am after is for the code to look at the values in Column F and Column I and copy every entry which is equivalent to $1million AUD TO Sheet AUD1M, I do have a sheet called Exchange_Rates in which the code can look into, they are all equivalent to 1 AUD. I have provided an example in Sheet AUD1M what the macro should do....
View 9 Replies
View Related
Dec 7, 2009
The code below restricts users from inputting anything other than an uppercase "X" in a cell within column N. If the user types a lowercase "x", it would automatically convert it to uppercase. If any other value is entered other than "X", a message box will fire.
The code is specific to column N (column 13). However, I would like to apply this to multiple columns, such as columns 13,14,17,20 .....
View 9 Replies
View Related
Sep 22, 2004
I am developing some code to extract selected worksheets to a new workbook, and provide the data in a "standalone" form where certain formulas have been converted to values etc. As part of this project, hidden columns are made visible, then data is pasted as values on a row by row basis, then the previously hidden columns are deleted. Here is the code that unhides the columns and identifies those columns as ones that it needs to delete later on:
'Expose hidden columns and keep a list
For i = 1 To 200
Range("a1").Offset(0, i - 1).Select
If ActiveCell.EntireColumn.Hidden = True Then
colnum = ActiveCell.Column
ActiveCell.EntireColumn.Hidden = False
If HideCOL <> "" Then
HideCOL = HideCOL & "," & colnum
Else
HideCOL = colnum
End If
End If
Next
The macro then goes about its business doing this and that, and at the end comes back to delete those offending columns whose numbers have been stored in the variable "HideCOL".
'Delete columns that were hidden
If HideCOL <> "" Then
Dim colArray As Variant .............
View 3 Replies
View Related