Project 2 - Create a report using PowerQuery, Macro VBA, List Functions and Data Validation functions for Data Reporting of Supply Chain Management companies
1. Multiple conditional formatting
sub multiple formatting()
dim myrange as range
set myrange = range(A1:ds307512)
myrange.formatcondtitions.Delete
Myrange.formatconditions.add type:"xlcellvalue, operator:"xlbetween, _
formula1:="=100", Formula2:="=150"
myrange.formatconditions(l).Interior.color = rgb(255,0,0)
myrange.formatconditions.add type:"xcellvalue, operator:"xlless, _
Formula1:="=100"
myrange.formatconditions(2).interior.color=vbblue
myrange.formatconditions.add type:"xcellvalue, operator:=xlgreater, _
formula1:="=150"
myrange.formatconditions(3).interior.color=vbYellow
myrange.formatconditions.add type:"xlcellvalue, operator:"xlless, _
formula1:="=100"
myrange.formatconditions(2).interior.color=vbblue
Endsub
2. Public sub pdf()
thisworkbook.sheets(array("sheet1","sheet2","sheet3")).select
activesheet.exportasfixedformat_
type:=xltypepdf, _
filename:="c:\temp.pdf", _
quality:=xlqualitystandard,_
indcludedocproperties:=true, _
ignoreprintareas:=false, _
openafterpublish:=true
end sub
3. public function checkitnew( r as range) as boolean
dim mytext as string
mytext = r(1).text
dim oxlap as object
set oxlap = createobject("excel.application")
checkitnew = oxlap.checkspelling(mytext)
oxlap.quit
set oxlap = nothing
end
https://drive.google.com/drive/folders/1m2P6bFj0nDK-c3xAfpP-kw7xRqx1tWEl?usp=sharing