Learn when you want, where you want with convenient online training courses. Sign up now!
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Dim ws2 As Worksheet, ws3 As Worksheet, ws4 As Worksheet
Dim x2, x3, x4, arrG(), arrL(), dict
Dim i As Long, lr As Long
Application.ScreenUpdating = False
Set ws2 = Sheets("Sheet2")
Set ws3 = Sheets("Sheet3")
Set ws4 = Sheets("Sheet4")
lr = ws4.Cells(Rows.Count, 1).End(xlUp).Row
x2 = ws2.Range("A1").CurrentRegion.Value
x3 = ws3.Range("A1").CurrentRegion.Value
x4 = ws4.Range("A1:T" & lr).Value
ReDim arrG(1 To UBound(x4, 1), 1 To 1)
ReDim arrL(1 To UBound(x4, 1), 1 To 1)
Set dict = CreateObject("Scripting.Dictionary")
For i = 2 To UBound(x2, 1)
dict.Item(x2(i, 2)) = x2(i, 11) & "_" & Round(x2(i, 4) * 1.0075, 2) & "_" & x2(i, 4) - 0.05
For i = 2 To UBound(x3, 1)
dict.Item(x3(i, 2)) = x3(i, 11) & "_" & Round(x3(i, 4) * 1.0075, 2) & "_" & x3(i, 4) - 0.05
For i = 1 To UBound(x4, 1)
If dict.exists(x4(i, 3)) Then
If x4(i, 10) = Split(dict.Item(x4(i, 3)), "_")(0) Then
arrL(i, 1) = Split(dict.Item(x4(i, 3)), "_")(1)
arrG(i, 1) = Split(dict.Item(x4(i, 3)), "_")(2)
ws4.Range("G1").Resize(UBound(x4, 1), 1).Value = arrG
ws4.Range("L1").Resize(UBound(x4, 1), 1).Value = arrL
Application.ScreenUpdating = True
Open in new window
The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.
minus 0.75% of column D of sheet3 to itself and paste that data in column L of sheet4
we have to do this if column K of sheet3 matches sheet4 column J and column B of sheet3 matches column C of sheet4
and if it not matches then
add 0.5 (this is not the percentage it is 0.5 paise) of column D of sheet3 and paste that data to sheet4 columnG but here column B of sheet3 should match column C of sheet4
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.