How to copy the conditional formatting without copying the rules from a Conditional Formatted cell?
Just discovered an easy way: Copy the table to MS Word and copy it back to excel 😀 It worked perfectly for me.
Just discovered an easy way: Copy the table to MS Word and copy it back to excel 😀 It worked perfectly for me.
Have you tried: Dim result As String Dim sheet As Worksheet Set sheet = ActiveWorkbook.Sheets(“Data”) result = Application.WorksheetFunction.VLookup(sheet.Range(“AN2”), sheet.Range(“AA9:AF20”), 5, False)
Actually a more refined solution is use the build-in function sumif, this function does exactly what you need, will only sum those expenses of a specified month. example =SUMIF(A2:A100,”=January”,B2:B100)
The advantage of using classes instead of just subroutines is that classes create a level of abstraction that allow you to write cleaner code. Admittedly, if you’ve never used classes before in VBA, there is a learning curve, but I believe it’s certainly worth the time to figure it out. One key indication that you … Read more
I believe you want to find the current region of A1 and surrounding cells – not necessarily all cells on the sheet. If so – simply use… Range(“A1”).CurrentRegion
I’m sure you’ll get a ton of “don’t do this” answers, and I must say, there is good reason. This isn’t an ideal solution…. That being said, I’ve gone down this road (and similar ones) before, mostly because the job specified it as a hard requirement and I couldn’t talk around it. Here are a … Read more
To put the same text in a certain number of cells do the following: Highlight the cells you want to put text into Type into the cell you’re currently in the data you want to be repeated Hold Crtl and press ‘return’ You will find that all the highlighted cells now have the same data … Read more
You can use DateValue to convert your string to a date in this instance Dim c As Range For Each c In ActiveSheet.UsedRange.columns(“A”).Cells c.Value = DateValue(c.Value) Next c It can convert yyyy-mm-dd format string directly into a native Excel date value.
This bug is not present on 32-bit, but it seems to be present in 64-bit VBA-capable applications (I’ve tried Excel, Word, and AutoCAD). Since the question already covers what happens if the Object does not get terminated or if there is no Class_Terminate event, the following examples all use an Object that will surely go … Read more