I've made a spreadsheet at home on Excel 2007 which has up to 5 Conditional Formatting rules per cell which works fine. The problem is when I save as 97-2003 version to send to work, the old version of Excel only supports 3 rules as you know, is there a way of applying 4 or 5 rules when specific text is populated in a cell on the old version of Excel?
I am trying to set up a macro that hides certain columns of data in an automated spreadsheet that I don't need. How do I make the macro that hides the columns apply to all spreadsheets that are open except for the one I am in?
I am trying to record a macro that edits a rows data, and simply copies it to a new cell further along on the same row,. but i then want it to move to the next row down, and apply the same macro to that run, and continue until there is no data in the last row,. How do I get the macro to continue to the end of the data.
I have a worksheet that I am always adding sheets to by duplicating an already existing tab. The tab ,"Current Invoice", is nested between sheets called "first" and "last". All duplicate sheets will also be nested between the "First" and "Last" tabs. What I would like to do is have a macro that affects all tabs between the "First" and "Last" only, even when the bookend tabs are hidden.
This is what I've started with.
HTML Sheets(Array("First", "Last")).Select ActiveWindow.SmallScroll Down:=18 Range("U29:U190").Select Selection.Copy Range("AA29").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("W29:W190").Select Application.CutCopyMode = False Selection.Copy Range("AB29").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub
Sub Remove_Duplicate() On Error Resume Next Columns("a").Insert With Range("b1", Range("b" & Rows.Count).End(xlUp)).Offset(, -1) .Formula = "=If(CountIf(B$1:B1,B1)=1,"""",False)" .SpecialCells(-4123, 4).EntireRow.Delete End With Columns("a").Delete End Sub
Basically I have lots of worksheets and I want to remove the duplicates in column B for each work sheet with a duplicate entry...
I poked around and found a macro to highlight the active cell, but I want to limit it to be active only for range A1:A37. Any ideas? I put in the Set OldCell = Range("A1:A37"), but all it does is turn every cell you pick blue and it stays that way, so I'm not sure how to limit it.
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Static OldCell As Range Set OldCell = Range("a1:a37") If Not OldCell Is Nothing Then OldCell.Interior.ColorIndex = xlColorIndexNone End If
Could somebody update the below code so that it actions all open workbooks except the master (Book2). Also, so that it appends the data (which is basically 2 neighbouring colums of data) to the Master starting in column A
Sub elaseval() For each cell in Range(“B7:B50”) Range("cell.Value").Select Selection.Copy Sheets("Input").Select Range("$E$7").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Sensitivity").Select Range("C” & cell.Row : ”T” & cell.Row").Select Selection.Copy Range("C" & Cell.Row).Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Next Cell End Sub
I am trying to apply this set of commands to each cell in the range B7:B50. For each of these cells, I need "cell.Value" to refer to the value in the respective cell and "cell.Row" to represent the row of the cell that is currently being used.
I'm Working on the next part of my long term project.
I need to count the number of Cells Selected in MacroTest2.xls column BG. ( Selection.count) ?
I need to Open Workbook MacroTest3.csv. It has a Header and only Row 2 filled with data. (Windows("MacroTest3.csv").Activate)
I need to Pulldown/Copy row 2 a number of times so that the Number of Duplicate Rows Created is Equal to the number of Selected Cells in the Count in MacroTest2.xls.
I have been able to do it based on a Static Number of Selected Cells (3) ( the existing Row + 2 ) by recording the manual event with this code.
I'm trying to understand how to declare the variable and apply it, so that the Number of Rows of Template Data in MacroTest3.csv is Equal to the Number of Selected Cells in MacroTest2.xls column BG.
This is part of a Macro that will then transfer some same selected Range of Cell Data as well. It is Currently working but not with a variable number of selected cells. I can post the whole code if it would help you to see the whole picture.
i used your recommended summary page that you posted somewhere in ozgrid. i have this workbook which has 6 worksheets.
1st sheet: summary page. this adds all the sheets between top and bottom 2nd sheet: "TOP" 3rd sheet: "Red" 4th sheet: "Blue" 5th sheet: "Yellow" 6th sheet: "BOTTOM"
i have this macro which performs some copy-paste-compute codes. my problem is this: i don't know what codes to use so that the macro will be applied to only those sheets between TOP and BOTTOM...
I have data in columns that I want to create charts for. However, this data is dynamic and the number of cells where there is data varies. The rest of the cells that don't have numbers have 0s, however if I applied a macro to the whole column all of the zeros would show up in the resulting charts. How can I create a macro where I can highlight just the cells (the ones with non-zero numbers) that I want a chart to be generated for. Or is there a way to ignore zeros/blanks completely in the macro?
Example: here are two columns with data. I want to make a macro that creates a chart by just highlighting the actual numbers and ignoring the zeros.
I'm trying to find a macro to apply conditional formatting to a large number of cells,
What I would like to do is when cell E96 has a value of a, cells E3:F95 are shaded in grey. Then when cell G96 has a value of a, cells G3:H96 are shaded in grey, and so on down to IU96 having a value of a and cells IU3:IV96 shaded in grey.
Step 1. In Col E a list of amounts will be pasted on a daily basis.
Step2. I need a macro that will look at the last code in Col F and apply the next sequence so $36,543.00 will have OPS003, since i might paste more than one amount in Col E i would like the macro to do the same thing also in Col F. I have a formula in G which will tell me what amounts are outstanding and which have cleared.
I have a workbook in which I have 31 sheets. I've also recorded a macro that works great when I run it on one sheet, but it comes up with an error when I try to run it on grouped worksheets. I searched Google, and a few articles I saw said that in order to run a macro on grouped sheets, you have to use loops. I don't know if this is true, but I don't know how to run loops anyway, so. I want to run the macro on 30 of the 31 sheets. I was going to put the code in, but when I did that my post didn't work, so I'm thinking there might be a limit on the length of a post.
I am creating a series of macros for a workbook, and at the beginning of each macro I unprotect all sheets and at the end of each macro I protect the sheets once more. The issue I am having is that even with these macros in place, I continue to receive an Excel alert message saying:
"The cell or chart that you are trying to change is protected and therefore read-only. To modify a protected cell or chart, first remove protection using the Unprotect Sheet command (Review tab, Changes group). You may be prompted for a password."
The macro will then run. Everything works as it should, but I do not want this error message to pop up. I have tried inserting
I have software that exports to an excel file. The files are one or two page reports. The way the software dumps the reports into excel, it comes out looking pretty rough. The rows and columns aren't spaced very well, the fonts look like garbage, and nobody likes them.
I would like to apply formatting changes to these reports automatically without the end user having to do anything. So as soon as the document is opened up it bolds the column headers, adjusts column widths etc. The reports are auto generated so no formatting can be done when the reports are made.
There may also be different formatting done to different reports. The files will come out named something like, "Report_A_DDMMYYY.xls, Report_B_DDMMYYY.xls," etc. Report A, and Report B will likely need different formatting.
I'm not opposed to using VBA or whatever might be necessary to make this happen. I can learn anything I need to pretty quickly, I just don't know where to start with this.
So right now the macro is run in every single worksheet in the workbook. Unfortunately, it appears the TRIM function erases formulas in cells. I want this macro to apply only to certain worksheets. Say the worksheets i want the macro to run on are named A1-A100.
i m trying to set up a macro to convert a range of user-highlighted(selected) cells to 3 significant figures: for example, convert 0.135564 to 0.136
the equation i found elsewhere online: ROUND(xx,3-(1+INT(LOG10(ABS(xx))))). but i can't quite figue out how to apply the equation to a selected range of cells via a macro.
Cycle through all sheets in a workbook performing the following:Store worksheet protection state (bSheetProtection)... execute code ...Restore worksheet protectionI cannot seem to locate a way to save a worksheet's protection state in a variable.
I am trying to loop through all of my worksheets in my workbook to apply a subotal to each of the sheets. I can get it to work with applying to just one named sheet, but I cannot get the loop to work. The sheets named "data" and "PriceList" do not need the subtotal applied.
Below is the code I am using:
Sub SubTotals() Dim LastRow As Long Dim wsDst As Worksheet
I need to apply the following code to all the sheets in my workbook (they are all identical format)
rivate Sub mymacro1() Application .OnTime TimeValue("10:27:00"), "MyMacro1" Dim objOL As Object Dim objItem As Object Dim lngRow As Long
Set objOL = CreateObject(" Outlook.Application")
lngRow = 6 Do While activehsheet. Cells(lngRow, 1) <> "" If ActiveSheet.Cells(lngRow, 6).Value < Date Then Set objItem = objOL.CreateItem(0) 'constant olMailItem = 0
With objItem .Body = "The training review for employee: " & ActiveSheet.Cells(lngRow - 5, 2) & " is due today """.....................
I don't know what syntax to use to 'globalise' if you like the macro to perform the action in the code to all the sheets.
I havae the following macro which i recorded in Excel. I want this Macro to run after another macro that groups data and creats tabs. The following macro will then add a column and run an array formula. I think this can be done in a loop but i'm not sure how to do it. This is working but takes a long time and times out by the time it reaches the last tab.
I'm currently applying these formulae manually, and also instructing other people to do the same, due to my lack of understanding of macros. Hopefully someone can give me some instruction as to how to do this automatically. I'd like people to be able to open sheets sent as normal CSV's and apply a macro to get them into the right format, changing only rows with data in them.
These are the instructions I'm currently sending:
In cell n1 enter: full phone number
in cell m2 enter: =RIGHT("00000000" & J2,8)
Drag m2 to last record
In cell n2 enter: =CONCATENATE(61,I2,M2)
Drag n2 to last record
In cell o1 enter: Date of call
in cell o2 enter: =DATE(MID(C2,7,4),LEFT(C2,2),MID(C2,4,2))
I would like to create a VBA macro which would do the following:
There will be three columns A, B, and C. Each cell in each column will have a number with two places after the decimal. Each integer corresponds to a letter code. In the fourth column (D), I would like the letter codes from the corresponding three numbers in the same row to be combined in one cell as follows (if possible):
It is important that the macro only pay attention to the whole number, and ignore the numbers after the decimal. However, the numbers after the decimal must remain in the chart.
I want to create a macro to take multiple inputs from sheet 2, apply them simultaneously to the inputs on sheet 1, take sheet 1's output and list next to the inputs on sheet 2. I want to apply this to a spreadsheet with complicated calculations. Example spreadsheet attached. Related Macros I have will do a similar thing but only take one input at a time. Code as follows.
VB: Sub x() Dim r As Range With Sheet2 For Each r In .Range("A2", .Range("A2").End(xlDown)) Sheet1.Range("A2") = r r.Offset(, 2).Resize(, 3).Value = Sheet1.Range("C2:E2").Value Next r End With End Sub