-
Dec 6th, 2024, 03:19 AM
#1
Thread Starter
Lively Member
-
Dec 9th, 2024, 05:37 AM
#2
Thread Starter
Lively Member
Re: Macro to search Invoices through tabs
i wanted to do this with below code
go to "Collection report" tab,Column "H" and start from cell "H2"and need to copy numbers before and after ";" and search in "Iogixinv" tab, column "E". if avilable "BOLD" the same number in "Collection report" tab,Column "H" and if not available make that number ITALIC in "Collection report" tab,Column "H"
Sub FormatNumbersInCollectionReport()
Dim wsCollection As Worksheet
Dim wsLogin As Worksheet
Dim cell As Range
Dim numbers As Variant
Dim number As Variant
Dim found As Range
Set wsCollection = ThisWorkbook.Sheets("Collection report")
Set wsLogin = ThisWorkbook.Sheets("Iogixinv")
For Each cell In wsCollection.Range("H2:H" & wsCollection.Cells(wsCollection.Rows.Count, "H").End(xlUp).Row)
numbers = Split(cell.Value, ";")
For Each number In numbers
number = Trim(number)
Set found = wsLogin.Columns("E").Find(What:=number, LookIn:=xlValues, LookAt:=xlWhole)
If Not found Is Nothing Then
cell.Font.Bold = True
Else
cell.Font.Italic = True
End If
Next number
Next cell
End Sub
after the above code everything gets italic and once that available are also getting bold.. please help
-
Dec 10th, 2024, 04:15 AM
#3
Thread Starter
Lively Member
Re: Macro to search Invoices through tabs
anyone there to give a me a helping hand..please
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|