Hi Alf ,
Thanks a tonne ,buddy for your time in attempting to answer my question,it means a lot to me and i appreciate it a lot ....regards time ,i will integrate a timer to each of yours.mrice and jaslake code and get values pasted in A1,A2,A3 cell so that we can actually note the time performance (just for knowledge )......
Coming to your question of price fixation ,must say that you hit the nail on the head when you see that there is no sense to price fixation ....i used randbetween function to generate odd numbers for every column to make it dummy invalid data to not risk my company credentials for obvious sensitivity issues .....
But the fact that you ask ,here's how it is done at my firm ,
We have a basic price ,say 100$
next column is freight @3% of basic price =3$
next is transit insurance @0.3% of basic price =0.3$
Next in india ,we have to pay excise duty (tax)+education tax @10.3% of basic price =10.3$
Also ,we pay sales tax @2%(basic price + excise )=@2%(110.3)=2.206$
Finally final price/per unit is summation of all this = 100+3+0.3+10.3+2.206=115.806 $ per unit ,
So if customer wants 10 units ,the price becomes =115.8*10=1158 $
That's how it happens in india ,
You see ,this was not important for me for i wanted to create seperate sample sheets so i kept random data here and did some odd garbage because i wanted to make it look as unreal as possible lest someone ever sees this info ........But if you would be really interested in having a feel of how price is calculated ,i can obviously do a dummy sheet for you ,but i think my calculation explanation above pretty much explains price fixation in india .........
Take good care ,buddy ,
I remain a passionate student of VBA ,also i had VOG a excelMVP answering for me for the same problem by his own code which goes like this ,
Sub sweetmacro()
Dim LastRow As Long, LastCol As Integer, i As Long, iStart As Long, iEnd As Long
Dim ws As Worksheet
Application.ScreenUpdating = False
With ActiveSheet
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
LastCol = .Cells(1, Columns.Count).End(xlToLeft).Column
.Range(.Cells(3, 1), .Cells(LastRow, LastCol)).Sort Key1:=.Range("E3"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
iStart = 3
For i = 3 To LastRow
If .Range("E" & i).Value <> .Range("E" & i + 1).Value Then
iEnd = i
Sheets.Add after:=Sheets(Sheets.Count)
Set ws = ActiveSheet
On Error Resume Next
ws.Name = .Range("E" & iStart).Value
On Error GoTo 0
ws.Range(Cells(1, 1), Cells(2, LastCol)).Value = .Range(.Cells(1, 1), .Cells(2, LastCol)).Value
.Range(.Cells(iStart, 1), .Cells(iEnd, LastCol)).Copy Destination:=ws.Range("A3")
iStart = iEnd + 1
End If
Next i
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
i somehow liked this code most since as a beginner ,this is far easy to decipher and understand but somehow it throws up a range error ,can you figure out why the above code doesn't work .i will be immensely greatful ,
And if you do ,then i will land up having 4 answers to my solution ....like in maths ,i love having so many solutions to a single query ,it's a fantastic feeling ,
I attach it as well so that you can directly run and see that it throws up a error ,in the meantime let me try your code and get back ,
Thanks again ,
Humble Regards ,
Amlan Dutta
Bookmarks