ok, Prathap, let's start with the following macro: months without
sales but with stock increase will get colored...
is this what you want: highlight it?
greetings
Paul Willekens
'=======================================================================
Sub StockAnalysis()
Dim lDone
Dim nCol
Dim nMonth
Dim nRow
nRow = 2
lDone = False
While Not lDone
For nMonth = 0 To 7
'first column in month
nCol = 2 + nMonth * 4
'reset colors to white
Cells(nRow, nCol).Interior.ColorIndex = 2
Cells(nRow, (nCol + 1)).Interior.ColorIndex = 2
Cells(nRow, (nCol + 2)).Interior.ColorIndex = 2
Cells(nRow, (nCol + 3)).Interior.ColorIndex = 2
'nothing dispatched?
If Cells(nRow, (nCol + 2)).Value = 0 Then
'but still purchased?
If Cells(nRow, (nCol + 1)).Value > 0 Then
Cells(nRow, nCol).Interior.ColorIndex = 19
Cells(nRow, (nCol + 1)).Interior.ColorIndex = 36
Cells(nRow, (nCol + 2)).Interior.ColorIndex = 44
Cells(nRow, (nCol + 3)).Interior.ColorIndex = 38
End If
End If
Next
nRow = nRow + 1
If Len(Cells(nRow, 1).Value) < 1 Then
lDone = True
End If
Wend
End Sub
'=======================================================================
--
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
To post to this group, send email to [email protected]
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!
We reach over 6,800 subscribers worldwide and receive many nice notes about the
learning and support from the group.Let friends and co-workers know they can
subscribe to group at http://groups.google.com/group/excel-macros/subscribe
To unsubscribe, reply using "remove me" as the subject.