Blogs
Nick's Day By Day Excel Experts Blog
Submitted by Nick on 15 December, 2008 - 13:36- Nick's blog
- 48 comments
- 48791 reads
Corona Virus - COVID 19 Model - UK
Submitted by Nick on 3 April, 2020 - 12:31If you have something to say, please join our Whatsapp chat!
Whatsapp Chat
3rd April
Please find a model and analysis of the current covid 19 pandemic.
The model will evolve over time as we obtain more data, and will be continually revised to match the data. Predictions are likely to change quite dramatically as the data comes in, and also as the government policies change.
- Nick's blog
- Login or register to post comments
- Read more
- 16186 reads
multiple results changing a single cell
Submitted by bundy5150 on 26 February, 2016 - 19:49Story so far. In a work book have several dozen calculations based on a single cell lets call it C5
In a second workbook I have 5 columns of data with multiple rows derived from the value in C5
Column 1 in the second book has the value C5, How can I utilize the one workbook to use diffent values for subsequent columns in the second workbook
Workbook #1
C5 = 300
b10 = c5 *100
b11 = c5 /3.1415926
b12 = etc
Workbook #2
A1 A2 A3 A4
- bundy5150's blog
- 2 comments
- Read more
- 25141 reads
Export all modules to another workbook
Submitted by Almir on 26 February, 2016 - 09:10'Use this code to export all modules from Personal.xlsb file to another workbook. Prior to running macro, open target workbook and change its name in the code accordingly.
Sub ExportImportModule()
For Each Module In Workbooks("Personal.xlsb").VBProject.VBComponents
If Module.name <> "ExportImportModule" Then
Module.Export ("c:\temp\" & Module.name & ".bas")
Workbooks("TargetWorkbook.xlsm").VBProject.VBComponents.Import ("c:\temp\" & Module.name & ".bas")
End If
Next Module
MsgBox "All objects (modules, forms and classes) were copied!"
- Almir's blog
- Login or register to post comments
- Read more
- 30691 reads
Required Help - Excel VBA
Submitted by Aasim Shaikh on 16 February, 2016 - 15:08I require your help in Auto-filling data in specific cells of various sheets using Excel VBA ;for the purpose of computing Balance Score Card for my Team.
I would be really thankful if you can assist me with the same. This will save a lot of my time.
• Data from Master Sheet must auto-populate in remaining sheets, with the Individual Agents names.
• I have coloured the cells for 1st Agent – Akhlaq Khan. Data from Yellow cells (from Master sheet) must auto-populate in Yellow cells (in sheet name ‘Akhlaq’). Similarly, for Pink and Orange cells.
• Similarly, for remaining Agents.
- Aasim Shaikh's blog
- 2 comments
- Read more
- 24717 reads
XLA Routines: EE_TableFreeHeading
Submitted by Nick on 9 February, 2016 - 16:40Function EE_TableFreeHeading(sht As Worksheet) As Range 'http://excelexperts.com/xla-routines-eeTableFreeHeading for updates on this function ' finds the next free cell to the right of a table Set EE_TableFreeHeading = sht.Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1) End Function
- Nick's blog
- Login or register to post comments
- 22740 reads
XLA Routines: EE_ExtractRow
Submitted by Nick on 9 February, 2016 - 16:36Sub EE_ExtractRow(Optional SourceSht As Worksheet, Optional TargetSht As String, Optional RowToExtract As Long, Optional wb As Workbook, Optional blnTranspose As Boolean = True) ' takes the selected cell row as default ' copies and transposes onto a new sheet 'http://excelexperts.com/xla-routines-eeExtractRow for updates on this sub routine If SourceSht Is Nothing Then Set SourceSht = ActiveSheet End If If wb Is Nothing Then Set wb = ActiveWorkbook
- Nick's blog
- 2 comments
- Read more
- 25748 reads
XLA Routines: EE_ReplaceErrors
Submitted by Nick on 9 February, 2016 - 16:34Sub EE_ReplaceErrors(Optional rng As Range, Optional ReplaceWith As String) 'http://excelexperts.com/xla-routines-eeReplaceErrors for updates on this sub routine ' takes a range and replace the errors in the range Set rng = EE_TableDefault(rng) On Error Resume Next rng.SpecialCells(xlCellTypeFormulas, 16).value = ReplaceWith rng.SpecialCells(xlCellTypeConstants, 16).value = ReplaceWith Err.Clear: On Error GoTo 0: On Error GoTo -1 End Sub
- Nick's blog
- Login or register to post comments
- 23755 reads
XLA Routines: EE_AddTableCalculatedColumn
Submitted by Nick on 9 February, 2016 - 16:33Sub EE_AddTableCalculatedColumn(Header As String, Formula As String) 'http://excelexperts.com/xla-routines-eeAddTableCalculatedColumn for updates on this sub routine ' adds a calculated column to a table on the activesheet Dim HeaderCol As Long Dim myData As Range If Cells(1).CurrentRegion.Rows.Count = 1 Then Exit Sub ' no data Set myData = EE_TableGetColumnData(Header) myData.ClearContents HeaderCol = EE_TableHeadingCol(Header) Cells(2, HeaderCol) = Formula myData.value = myData.value
- Nick's blog
- Login or register to post comments
- Read more
- 24343 reads
XLA Routines: EE_FormatCols
Submitted by Nick on 9 February, 2016 - 16:32Sub EE_FormatCols(rngSource As Range, Optional rngTarget As Range) 'http://excelexperts.com/xla-routines-eeFormatCols for updates on this sub routine ' takes a source range containing the heading and format in 2 cols ' looks in the target range and formats the target range Dim rngHd As Range Dim rngFound As Range Call EE_Start Set rngTarget = EE_TableDefault(rngTarget).Rows(1) For Each rngHd In rngSource.Rows Set rngFound = rngTarget.Find(rngHd.Cells(1).value, , xlValues, xlWhole)
- Nick's blog
- Login or register to post comments
- Read more
- 22633 reads
XLA Routines: EE_ReverseSignInRange
Submitted by Nick on 9 February, 2016 - 16:04Sub EE_ReverseSignInRange(rng As Range) 'http://excelexperts.com/xla-routines-eeReverseSignInRange for updates on this sub routine ' takes a range as input and reverses the sign of numbers in the range ' turns positive numbers negative and negative numbers positive Dim theCell Set rng = Intersect(rng.Parent.UsedRange, rng) ' rng.select For Each theCell In rng If Application.IsNumber(theCell.value) Then theCell.value = theCell.value * -1 End If Next End Sub
- Nick's blog
- Login or register to post comments
- 29113 reads
XLA Routines: EE_ListSheetNames
Submitted by Nick on 9 February, 2016 - 16:02Sub EE_ListSheetNames(Optional NewShtName As String) 'http://excelexperts.com/xla-routines-eeListSheetNames for updates on this sub routine ' lists the names of the sheets on a new sheet Dim sht As Worksheet If NewShtName = "" Then NewShtName = "Index" End If Call EE_ReplaceSheet(NewShtName) i = 1 On Error Resume Next For Each sht In ActiveWorkbook.Sheets Cells(1).Offset(i) = sht.Name ActiveSheet.Hyperlinks.Add Anchor:=Cells(1).Offset(i), Address:="", Sub
- Nick's blog
- Login or register to post comments
- Read more
- 12866 reads
XLA Routines: EE_PivotTurnOffNonBlank
Submitted by Nick on 9 February, 2016 - 16:01Sub EE_PivotTurnOffNonBlank(pvtField) 'http://excelexperts.com/xla-routines-eePivotTurnOffNonBlank for updates on this sub routine ' turns off non-blank items from pivot table ' assumes 1 pivot on page, no error checking Dim pvtItem pvtField.CurrentPage = "(All)" pvtField.EnableMultiplePageItems = True For Each pvtItem In pvtField.PivotItems If pvtItem.Name = "(blank)" Then pvtItem.Visible = True Else pvtItem.Visible = False End If Next End Sub
- Nick's blog
- Login or register to post comments
- 7264 reads
XLA Routines: EE_PositionInRange
Submitted by Nick on 9 February, 2016 - 15:57Function EE_PositionInRange(Header As String, rng As Range) As Long 'http://excelexperts.com/xla-routines-eePositionInRange for updates on this function ' Takes a heading name, range ' returns the position in the range as long ' returns 0 if not found On Error Resume Next EE_PositionInRange = Application.WorksheetFunction.Match(Header, rng, 0) If Err.Number <> 0 Then EE_PositionInRange = 0 End If End Function
- Nick's blog
- Login or register to post comments
- 7174 reads
XLA Routines: EE_TableDefault
Submitted by Nick on 9 February, 2016 - 15:43Function EE_TableDefault(Optional rngTable As Range) As Range 'http://excelexperts.com/xla-routines-eeEE_TableDefault for updates on this function ' returns the currentregion around the first cell - a good guess for a table of data's range Set EE_TableDefault = rngTable If rngTable Is Nothing Then Set EE_TableDefault = ActiveSheet.Cells(1).CurrentRegion End If End Function
- Nick's blog
- Login or register to post comments
- 5965 reads
Conditional formating based on the sum of cells
Submitted by vypinac2 on 25 January, 2016 - 23:13Hi, I am trying to identify cells sum of which equals to cerain value/amount. Is there a way of doing this at all? Thank you.
- vypinac2's blog
- 5 comments
- 11316 reads
Need multifunctional formula or If condition in same cell repeated
Submitted by JoyLynn on 10 January, 2016 - 05:52I want to increment by one unit going left 18 spaces, and at the same time increase by 18 in column 18 columns total. Possible?
- JoyLynn's blog
- Login or register to post comments
- 6547 reads
Help Adding the +/- button to the first item in a Group
Submitted by chasBent on 18 November, 2015 - 22:10I am trying to create a simple drop down or expandable field that allows me to simply click a +/- in the top cell of a group to expand that group so I can enter data...then close that group and open a new group. Very similar to just creating the group with the plus and minus on the left of the worksheet....but I want a button in the top cell of each group. Is that possible?
Thanks so much.
Charles
- chasBent's blog
- 2 comments
- 7878 reads
Getting MODE if certain criteria is met
Submitted by dave s on 9 November, 2015 - 16:39In my data I have a list of sales (amounts) by cities. How can I get the mode for the sales only where the city = chicago? I have sorted the list by city and written the mode formula based on my sort to get only Chicago sales (rows 10:20). This works as long as the list stays sorted because the mode range is specific to to the sort results.
Thanks
- dave s's blog
- 2 comments
- 11366 reads
Looking for differences in similar data sets
Submitted by ShirleyF on 13 October, 2015 - 13:16Hi There.
I am analysing a sales order book on a week to week basis. The Sales order reference remains the same but order values can change daily based on shipped/cancelled and amended orders. Can anybody suggest the best way to reconcile these differences in excel please?
- ShirleyF's blog
- 1 comment
- 8061 reads
Export spreadsheet data to Access
Submitted by Vishesh on 10 October, 2015 - 17:39Following macro can be used in Excel VBA to export Excel data into Access.
Sub TestMacro()
Call ExcelToAccessTransferSpreadsheet("G:\ExcelExperts\ExcelAccessTest.mdb", "DBTestTbl", "G:\ExcelExperts\Test.xlsm", "Sheet1", "A1:C8")
End Sub
Sub ExcelToAccessTransferSpreadsheet(strDBPath As String, strDBTableName As String, strExcelFilePath As String, strSheet As String, strRange As String, Optional blnClearTableBfrUpload As Boolean = True, Optional blnDropTableBfrUpload As Boolean = False)
'Should have access on the system
'Creates a new table in Access if not found
- Vishesh's blog
- Login or register to post comments
- Read more
- 8983 reads
Mail Merge Help
Submitted by JeysJeys on 23 September, 2015 - 06:48Dear Sir,
I have an excel sheet with email ids of people and also the email ids of their reporting managers.
Now I have to create multiple letters, which I am contemplating to do with Mail merge and create the messages, but when I send out the output I want the mails to be sent with CC to the reporting manager. But in the Word the email is only sent to one id and no field to capture the email id for CC.
I understand it can be achieved with macro.
I tried to record and do but then failed.
Some one could help me on this would really be grateful.
- JeysJeys's blog
- Login or register to post comments
- 8620 reads
excel help
Submitted by jasonmandeville on 30 August, 2015 - 17:15We have a friendly league where everyone drafts 9 teams and picks one. The person with the most wins at the end of the season wins. I have made a manual entry excel sheet to enter wins from each college football team and nfl team. I was wondering if there is a way for the win totals to update automatically. Thanks
see attachment
- jasonmandeville's blog
- 1 comment
- 9986 reads
Truncating text files to extract only email addresses
Submitted by Rushki1 on 21 August, 2015 - 10:26Hello does anyone know a formula to extract just the email addresses from files with records as follows:
aaasilv@terra.com.br;85.72.201.151;Athens;Attiki;Greece;20/07/2015;Nao;Sim;;;;1430833559
aabmeneses@terra.com.br;187.90.44.115;Salvador;Bahia;Brazil;20/07/2015;Nao;Sim;;;;3143249011
I have a total of 25,000 records for this extraction so a truncation solution would be appreciated!
The text required for each of the records above is:
aaasilv@terra.com.br
aabmeneses@terra.com.br
Thanks
- Rushki1's blog
- 2 comments
- 9550 reads
Excel cannot open .xls file
Submitted by melvin88 on 7 June, 2015 - 12:54Hi
Got a new customers pc here. she had a virus last week (one of the ucash ones) . she then ""spent all day trying to fix it following instructions on various forums""
She has no idea what she actually did. the virus isnt there anymore, but now nearly nothing works on the pc. sys restore doesnt work and every single document is giving me the error ""the open office xml file xxxx.docx cannot be opened because there are problems with its contents"" details: ""the file is corrupt and cannot be opened"". this also happens with xls, xlsx, docx, doc, csv
- melvin88's blog
- 2 comments
- Read more
- 11838 reads
User friendly differential equation solver
Submitted by sengla12 on 28 May, 2015 - 23:38This is kind of hard to explain.
I am creating a numerical solver that gets input from students in the form of an equation. An example being x^2 + y^2. I'd like to take this input and somehow put it into VBA as is.
This equation is going to be in a for each loop, where the values of x and y are changing with each iteration.
For i = 1 To n
m = x^2 + y^2 'Equation input from students
y1 = y + m * dx
y = y1
x = x + dx
Next i
- sengla12's blog
- 1 comment
- Read more
- 10598 reads
VBA Macro to send Email to added recipients
Submitted by E5254730 on 20 April, 2015 - 08:05Hi,
I have a macro file, where as per my selection (Customer Name Selection), I;m able to send email to the specified customer. Like - Once I select Xerox Co. from the filter and click on Send E-mail button, all the fields of Xerox Co gets copied to new workbook and I'm able to send email to the recipient mentioned in the VBA code.
Now what I want is - instead of having the email id mentioned in the vba codes. I'll like to have a column of email id of all the customer in column B for each customer name (abc@xerox.com, xyz@xerox.com).
Thanks for your help in advance
Regards,
- E5254730's blog
- 2 comments
- Read more
- 12750 reads
How to filter multi column data and then appear filter data in seperate sheet
Submitted by ammad134 on 6 April, 2015 - 07:35I have excel sheet that have more than 100 column. I want to make easy interface for user, my requirement is below.
detail of sheet are like
1- Column A to H are fixed and I want to filter the remaining column like I to Z.
2- When I filter the column I want the result that it will show only column that I filter and starting column A to H.
3- user interface is like drop down search of column I to Z.
- ammad134's blog
- 4 comments
- 12223 reads
Need macro to remove item and reset back to zero
Submitted by excelnovice1967 on 26 March, 2015 - 15:57I need help creating a macro that will remove a stock item from one tab and reset to zero so the macro can be run multiple times. The crux I am facing is being able to use this as a counter but in a negative sense. On the 'PRODUCTION'tab, I need to have the capability of removing stock item "TANK SIDE" from 'DS TANK' tab when a serial number is entered on the 'PRODUCTION' tab. The 'DS TANK' and 'PS TANK' tabs our inventory tabs and need the ability to add and subtract parts as they are produced and taken for assembly. I have attached a file for your perusal.
- excelnovice1967's blog
- Login or register to post comments
- 10808 reads
Adding value (5,2,1 year) to a cell value based on another cell value (DOB)
Submitted by HS710Excel on 17 March, 2015 - 13:22Hello All,
I have multiple excell worksheets with list of columns. Column C is Birth Year,column D is date of Approved, I want in Column C to calculate based on this criteria:
If Column C is <35 years add 5 years to Column D
If Column C is 35-45 years add 2 years to Column D
If Column C is >45 years add 1 years to Column D.
Please See my attached file!!
I used IF funciton but the outcome is not what i want
My formula:
=IF(TODAY()-C2>45,DATE(YEAR(K5)+1,MONTH(D2)+0,DAY(D2)+0),IF(TODAY()-C2<35,DATE(YEAR(D2)+5,MONTH(D2)+0,DAY(D2)+0))).
- HS710Excel's blog
- 1 comment
- Read more
- 11185 reads
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago