Friday, December 20, 2024
How to get Ranking of the Students in Excel using RANK Function
=RANK(number,ref,[order])
To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0)
If we want unique ranks, we can use the formula:
=RANK(C5,$C$5:C$10,0)+COUNTIF($C$5:C5,C5)-1
For ascending order, the formula would be:
=RANK.EQ(C5,$C$5:C$10,1)+COUNTIF($C$5:C5,C5)-1
Friday, December 13, 2024
Prevent duplicate entry in excel.
Wednesday, October 2, 2024
Contatenate text to Date to Sort
Convert 01.01.2024 to 01/01/2024 to count as date in Excel.
=DATE(RIGHT(A2,4),MID(A2,FIND(".",A2,1)+1,FIND(".",A2,FIND(".",A2,1)+1)-FIND(".",A2,1)-1),MID(A2,1,FIND(".",A2,1)))
Wednesday, May 1, 2024
Extract Domain from email in Excel or Google sheet
=TEXTAFTER(A2, "@")
or,
=MID(A1, FIND("@", A1) + 1, LEN(A1) - FIND("@", A1))
Friday, February 16, 2024
Increment the cell in Vlookup when dragging horizontally in Excel
Thursday, October 5, 2023
Export multiple records one by one from Excel
Sub Print1()
For a = 1 To 10
Sheet3.Range("L2").Value = a
ActiveWindow.SelectedSheets.PrintOut copies:=1, collate:=True,
IgnorePrintAreas:=False
Next
End Sub
Export multiple records to PDF one by one from Excel
Sub ExportRangeToPDF()
For a = 3 To 10
Sheet1.Range("D4").Value = Sheet2.Cells(a, "A")
Sheet1.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Users\Naeem\OneDrive\Desktop\PrintingPDF\" & Sheet1.Range("D4").Value & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Next
End Sub
Sunday, August 6, 2023
Repeat Rows At Excel Bottom using VBA
Sub repeatBotRows()
Dim botRows As Range, botCount As Long
Dim firstPgBk As Long, LasRow As Long
Dim totPages As Long, n As Long, m As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Set botRows = Range("2:7")
Sheets("Sheet1").Copy after:=Sheets("Sheets1")
ActiveSheet.Name = "printOrig"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
End With
firstPgBk = ActiveSheet.HPageBreaks(1).Location.Row - 1
botCount = botRows.Rows.Count
LasRow = Cells.Find("*", [a1], , , xlByRows, xlPrevious).Row
totPages = Application.Ceiling(LasRow / (firstPgBk - botCount - 1), 1)
Range(Rows(firstPgBk - botCount + 1), Rows(firstPgBk)).Select
Selection.EntireRow.Insert Shift:=xlDown
botRows.Copy Range("A" & firstPgBk - botCount + 1)
n = 2
m = 0
Do
Range(Rows(firstPgBk * n - botCount - m), Rows(firstPgBk * n - m - 1)).Select
Selection.EntireRow.Insert Shift:=xlDown
botRows.Copy Range("A" & firstPgBk * n - botCount - m)
n = n + 1
m = m + 1
Loop Until n > totPages
Application.Calculation = xlCalculationAutomatic
' ActiveSheet.PrintOut
' ActiveSheet.Delete
ActiveSheet.Buttons.Delete
Application.DisplayAlerts = True
End Sub
Repeat excel rows at bottom
Sub MyFooter()
Dim xTxt As String
Dim xAddress As String
Dim xRg As Range
Dim xCell As Range
On Error Resume Next
xAddress = ActiveWindow.RangeSelection.Address
Set xRg = Application.InputBox("Select the row you will insert repeatedly at the bottom:", "Kutools for Excel", xAddress, , , , , 8)
If xRg Is Nothing Then Exit Sub
For Each xCell In xRg
xTxt = xTxt & xCell.Value & " "
Next
ActiveSheet.PageSetup.LeftFooter = xTxt
End Sub
Friday, July 28, 2023
Repeating Rows at the bottom of each printed excel sheet using VBA
Sub MyFooter()
Dim StrFtr As String, Rng As Range, Sh As Worksheet, c As Range
Set Sh = Worksheets("Sheet5")
Set Rng = Sh.Range("A55:G55")
For Each c In Rng
StrFtr = StrFtr & c & " "
Next c
ActiveSheet.PageSetup.LeftFooter = StrFtr
End Sub
Hide rows in excel based on cell value using VBA
Tuesday, May 16, 2023
Wednesday, March 1, 2023
Generate specific range of numbers having specific digit in excel
The following function is for generating 8 digit unique number in excel and masked with 123:
=RANDBETWEEN(12300000,12399999)
Tuesday, January 3, 2023
Get file path and set hyperlink funtion in Excel
=CONCATENATE("file://",LEFT(CELL("filename",F2),FIND("[",CELL("filename",F2))-1),F2)
=HYPERLINK($G$2,F2)
Tuesday, May 24, 2022
Wednesday, January 5, 2022
How To Generate Random Alpha Numeric Strings In A Range In Excel?
=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(100,10000)&CHAR(RANDBETWEEN(65,90))
Friday, August 6, 2021
Google Sheet Sigle column No Duplicate Data Validation
Here the example is given for column A:
=COUNTIF($A$2:$A711,$A13)<2
Saturday, May 1, 2021
How to extract a substring that comes after or before a specific symbol like @ in excel?
How to get Ranking of the Students in Excel using RANK Function
=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...
-
Put the following code in a TXT file and save as "file.cmd" then run the cmd file as administrator. @echo off title Activate Micr...
-
We can install PowerMTA on the server. rpm -ivh /home/PowerMTA-4.0r6.x86_64.rpm You will see the output like this Preparing... #############...
-
# $Id: config 2015-03-24 16:00:00 Jack $ # Sample PowerMTA configuration file # PowerMTA Multiple Virtual PMTA config file sample # # E-mai...