Work calls. And I shall have to finish my tasks. For what we do in modernity, echoes in eternity.
Sunday, 22 December 2019
Friday, 20 December 2019
Quickly Find Out Blank Cells within a Column
The headline is misleading or is incomplete at best. I agree. You will, too, after you have gone through this post. As bland as it may seem at first, you might find this a tad interesting for the application it was designed and intended to perform.
Microsoft Excel VBA macro programming is a powerful way to experience how data can be manipulated and viewed.
I was given this assignment to find out number of blank cells between two non-blank cells within a range in a spreadsheet. For example, if A1 was a non-blank cell and A4 was the same, too, then B1 should have a display of 2 to indicate that there are two cells that are blank in between.
Following is the full extract of the macro that I wrote to accomplish the task at hand. In case you need help, please do not hesitate to reach out to me.
Function CheckBlanks(CheckRange As Range)
'Created: Satadru Sengupta.
'Dated: 18-12-2019
Evaluate "CheckBlanksSub(" & CheckRange.Address(False, False) & ")"
CheckBlanks = "Difference of blanks created"
MsgBox ("Range difference created. You may delete the formula / user-defined function used.")
End Function
Private Sub CheckBlanksSub(CheckRange As Range)
Dim getRowNum As Integer
Dim getColNum As Integer
Dim initiatePointRow As Integer
Dim endPointRow As Integer
Dim differenceRows As Integer
getRowNum = CheckRange.Row
getColNum = CheckRange.Column
initiatePointRow = 1
differenceRows = 0
initiatePointRow = getRowNum
endPointRow = initiatePointRow
For row1 = 2 To CheckRange.Columns(1).Cells.Count
If CheckRange.Cells(row1, 1).Value = "" Then
differenceRows = differenceRows + 1
Else
ActiveSheet.Cells(endPointRow, getColNum + 1).Value = differenceRows
endPointRow = getRowNum + row1 - 1
differenceRows = 0
End If
Next
End Sub
Microsoft Excel VBA macro programming is a powerful way to experience how data can be manipulated and viewed.
I was given this assignment to find out number of blank cells between two non-blank cells within a range in a spreadsheet. For example, if A1 was a non-blank cell and A4 was the same, too, then B1 should have a display of 2 to indicate that there are two cells that are blank in between.
Following is the full extract of the macro that I wrote to accomplish the task at hand. In case you need help, please do not hesitate to reach out to me.
Function CheckBlanks(CheckRange As Range)
'Created: Satadru Sengupta.
'Dated: 18-12-2019
Evaluate "CheckBlanksSub(" & CheckRange.Address(False, False) & ")"
CheckBlanks = "Difference of blanks created"
MsgBox ("Range difference created. You may delete the formula / user-defined function used.")
End Function
Private Sub CheckBlanksSub(CheckRange As Range)
Dim getRowNum As Integer
Dim getColNum As Integer
Dim initiatePointRow As Integer
Dim endPointRow As Integer
Dim differenceRows As Integer
getRowNum = CheckRange.Row
getColNum = CheckRange.Column
initiatePointRow = 1
differenceRows = 0
initiatePointRow = getRowNum
endPointRow = initiatePointRow
For row1 = 2 To CheckRange.Columns(1).Cells.Count
If CheckRange.Cells(row1, 1).Value = "" Then
differenceRows = differenceRows + 1
Else
ActiveSheet.Cells(endPointRow, getColNum + 1).Value = differenceRows
endPointRow = getRowNum + row1 - 1
differenceRows = 0
End If
Next
End Sub
Monday, 16 December 2019
Pithy Saying
At some future period, not very distant as measured by centuries, the civilized races of man will almost certainly exterminate and replace the savage races throughout the world.
Charles Darwin
Charles Darwin
Friday, 13 December 2019
Secularism and Citizenship
It is a sad state to see that we are quickly going the way of losing our secular identity. Fundamentalists and extremists seem to be rampant on either religious denominations. I pray to the Almighty the Omniscient the Munificent that may peace and harmony prevail forever in the land that gave birth to Netaji Subhash Chandra Bose, the Mahatma, our national pride and the Late President Abul Pakir Jainalubdin Abdul Kalam, Mohammed Rafi Ahmed Kidwai, and many more who shall forever remain etched in the fabric of our nation's great history and proud heritage.
My heart grows sad for no one should feel alienated or segregated. Ghettoisation is neither wanted nor should be tolerated. Jingoism and playing to the crowd are what our nation does not ever require. What our country needs is to eradicate corruption, sectarian violence, ensure that its citizens are protected at night and in remote corners of the country at all times. Our country needs our children to grow strong, healthy and prosperous. Religion is what we turn to to keep our society from plunging into depravity and moral turpitude. Religion is not and should never be a rod to stir up issues for the sake of political mileage and economic benefit for a select few.
It is said that quotes by the Mahatma are the most frequently quoted ones on the Internet. What, therefore, could be better than using one made famous by his views on Truth and Nonviolence - "It is easy enough to be friendly to one's friends. But to befriend the one who regards himself as your enemy is the quintessence of true religion. The other is mere business."
Subscribe to:
Posts (Atom)
Resetting password of Amazon Kindle Paperwhite (7th Generation)
What to do to in case one forgets the password of an Amazon Kindle Paperwhite (7th Generation)? The answer is to type in 111222777 and...
-
These are the list of the top trending words and articles that are being bandied about with consummate ease (almost every English daily or ...
-
I am a writer; or at least I pretend to be one. But for all my efforts at writing, the most that I do is reading. Some say, that you need ...
-
Zooming in on Security Threats of using Zoom In the wake of coronavirus pandemic, Zoom Cloud Meetings has arguably consolidated its po...