Re: $$Excel-Macros$$ Need Help in VBA

2016-10-10 Thread De Premor
Try this one ! [dp] On 10/10/2016 19:46, sonuraj1...@gmail.com wrote: Hi I need help for separate data through VBA. My Data is below type.. sku Size 10307963XS,S,M,L 10307973XS,S,L 10307978XS,S,M,L 10307979XS,S,L 10307980XS,S,XL 10307981XS,S,M,L 10307984XS,M,

Re: $$Excel-Macros$$ Min With Index

2015-09-15 Thread De Premor
Hi Chandra, You need to put Match Type on that MATCH formula =INDEX(A2:B6;MATCH(MIN(B2:B6);B2:B6*;0*);1) Rgds, [dp] On 15/09/2015 14:24, Chandra Shekar wrote: Hello, Am trying to find out student name who scored min marks using index & min function but its giving error. Could you please find

Re: $$Excel-Macros$$ Need help on keeping copy-paste simpler

2015-09-14 Thread De Premor
Special Paste:=xlFormulas Application.CutCopyMode = False End If Regards, Isabel On Sunday, September 13, 2015 at 8:56:11 PM UTC-5, De Premor wrote: We can avoid using loop in this case, try to replace your looping code with offset and resize, try this another solution Dim u

Re: $$Excel-Macros$$ Need help on keeping copy-paste simpler

2015-09-13 Thread De Premor
We can avoid using loop in this case, try to replace your looping code with offset and resize, try this another solution Dim u As Integer u = Range("Months").Value - 1 If u > 1 Then Range("ColumnLong").Resize(, u).Insert Range("ColumnFormula").Copy Range("ColumnLong").Offset(, -u).R

Re: $$Excel-Macros$$ Macro to Insert Pictures according to the Cell Value in Column A

2015-08-02 Thread De Premor
, waiting for your respond. On 01/08/2015 23:40, Rashid Khan wrote: Thanks for your explanation. But unfortunately it is not working. I am just enclosing herewith the pics which I am using for testing on your side. Regards On Sat, Aug 1, 2015 at 4:22 AM, De Premor <mailto:d...@premor.net>&

Re: $$Excel-Macros$$ Macro to Insert Pictures according to the Cell Value in Column A

2015-07-31 Thread De Premor
works only for 1.jpg and not for any other pictures. Kindly look into the code thanks once again. On Sat, Aug 1, 2015 at 12:00 AM, De Premor <mailto:d...@premor.net>> wrote: Here is the code, you can make changes or experiment with it Private Sub Worksheet_BeforeDoubleClick(B

Re: $$Excel-Macros$$ Macro to Insert Pictures according to the Cell Value in Column A

2015-07-31 Thread De Premor
Here is the code, you can make changes or experiment with it Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) On Error Resume Next If Target.Column = 1 Then Target.Offset(0, 1).Select ActiveSheet.Pictures.Insert("C:\Product\Pictures\" &

Re: $$Excel-Macros$$ Excel workbook Issues

2015-07-29 Thread De Premor
Hi Vijayendra, I've look at your workbook, there is to many shapes "textbox" on your sheets, on sheet "a" there is 27.456 shapes, and on sheet "b" 37.419 shapes. You can use this code to know how many shape on it. Dim i As Long For i = 1 To Sheets.Count MsgBox "Sheet " & Sheets(i).Name & v

Re: Fwd: $$Excel-Macros$$ Send Bulk Mail Macro

2015-07-29 Thread De Premor
Hi Nilkanth, PFA, hope it solve your requirement Rgds, [dp] On 29/07/2015 17:01, Nilkanth Raval wrote: Hi All, Can anyone help me in below mail??? Thanks, Nilkanth Raval -- Forwarded message -- From: "Nilkanth Raval" > Date: Jul 28, 2015 3:

Re: $$Excel-Macros$$ Conditional Formatting

2014-12-26 Thread De Premor
PFA On 27/12/2014 1:06, Alison Toczko wrote: Hi. I have a spreadsheet with cells containing month and year (ie. Mar 2014) without using a day. I would like the cell to be yellow if we are in the current month and year, and appear red if the month and year has passed. Using Excel 2013, what cel

Re: $$Excel-Macros$$ Re: Item search in Userform

2014-10-16 Thread De Premor
Hi All, I've writen a code for this case, i use a junk sheet for removing duplicate and sorting, it seem more easy to use, much faster, flexyble, and cut off unneeded code what i've done is on form initialize is : copy date to junk sheet, remove the duplicate, sort it, and place it on combo

Re: $$Excel-Macros$$ Serial Number macro problem

2014-10-15 Thread De Premor
Another Version: Sub GenSN() Dim Data, lRow As Long, lNum As Long, SrcData As Range Set SrcData = ActiveSheet.Range("A:Z").Find("S>No").CurrentRegion Data = SrcData.Value For lRow = 1 To UBound(Data, 1) lNum = lNum + 1 If Not IsNumeric(Data(lRow, 1)) Then lNum =

Re: $$Excel-Macros$$ split text by pipe sign

2014-10-14 Thread De Premor
Try this =TRIM(MID(SUBSTITUTE($A15;"|";REPT(" ";99));(COLUMN(A1)*99)-98;99)) the idea is replacing a pipe char with 99 times white space using SUBSTITUTE so we can trim it later to get the exact word then we break it a part every 99 char using MID function, and then remove the white space usin

Re: $$Excel-Macros$$ How to copy a series of ranges from one worksheet to another

2014-02-20 Thread De Premor
Hi Rob, Try this 2 code, first sub code just need a few line code, but it slower than next sub code, i suggest second sub code if you have large data list to process Sub Simple() Dim Rng As Range For Each Rng In Sheet1.UsedRange.Offset(1) If Not Trim(Rng) = "" Then

Re: $$Excel-Macros$$ Query for Macro

2014-02-20 Thread De Premor
Hi Prafull, Try this if you want to use In Cell formulas, paste bellow code in module Function IsOK(CRef As Range) As String Dim Str As String Str = UCase(CRef.Value) If InStr(1, Str, "YES") Or InStr(1, Str, "NO") Or InStr(1, Str, "CORRECT") Then IsOK = "OK" End Function Then just

Re: $$Excel-Macros$$ writing into a single depending column value...

2013-10-23 Thread De Premor
Try to paste this code on VBA module, then run sub tes Sub Tes() Dim Src, Res, LRow As Long, Id, ColCust As New Collection, ColID Src = Range("A2").CurrentRegion.Offset(1) ReDim Res(1 To UBound(Src, 1), 1 To Columns.Count) ReDim ColID(0 To Columns.Count) For LRow = 1 To UBou

Re: $$Excel-Macros$$ Formula Required

2013-10-22 Thread De Premor
another way :) =UPPER(LEFT(A2,1)&LEFT(TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",99)),99)))&TEXT(B2,"DDMM")&LEFT(C2,1)&RIGHT(C2,1)) On 22-10-2013 17:51, Anoop K Sharma wrote: PFA updated with little change as described above. On Tue, Oct 22, 2013 at 4:18 PM, Anoop K Sharma mailto:aks.sharm.

Re: $$Excel-Macros$$ Help required in a small formula.....

2013-10-11 Thread De Premor
This formula have 6 part *=1-(**(B3/D2)^2**+**(B4/D2)^2**+**(B5/D2)^2**+**(B5/D2)^2**+**(B6/D2)^2**+**(B7/D2)^2**)* And this Only 5 Part, Purple part was missing *=1-(**(1/5)^2**+**(1/5)^2**+**(1/5)^2**+**(1/5)^2**+**(1/5)^2**)* On 12-10-2013 3:52, Indrajit $nai wrote: Hello Experts, Kindly fi

Re: $$Excel-Macros$$ Re: Read a Text file with delimiter as comma and import the infor into excel sheet

2013-10-09 Thread De Premor
Another way, little longer in code :D and just a little faster I'am using manual method, fist, openit as textfile and split by delimiter, then copy each column to specified destination in attached sample with 500k row data, can processed in 2,6 seconds @ my old comp On 09-10-2013 13:13, An

Re: $$Excel-Macros$$ Re: Multi sheets Grouping Problem

2013-10-07 Thread De Premor
Hi renuka, try to put this code on button1 on click event Private Sub CommandButton1_Click() Dim i As Integer, Str As String For i = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(i) Then Str = Str & IIf(Len(Str) > 0, "|", "") & ListBox1.List(i) Next Sheets(Split(Str,

Re: $$Excel-Macros$$ Email Trigger ?

2013-10-07 Thread De Premor
I think he want to check after data refreshed */I have a dynamic spreadsheet that monitors different stock prices that is refreshed ever "x" amount of minutes./* On 07-10-2013 16:23, Ravinder wrote: U want this in which event like when u change value of sheet or do some calculation or open

Re: $$Excel-Macros$$ Identifying Excel number format

2013-10-05 Thread De Premor
try this Sub xcv() Dim Data As Range, Rng As Range Set Data = Range("A6") Set Data = Range(Data, Data.End(xlDown)).Offset(, 4) For Each Rng In Data Rng.Offset(, 2) = Rng * IIf(InStr(1, Rng.NumberFormat, "Cr") > 0, -1, 1) Next End Sub Pada 05/10/2013 14:23, Sandee

Bls: Re: $$Excel-Macros$$ Inserting BMP (Bitmap) Images Into A Predefined Cell Size

2013-10-03 Thread De Premor
g BMP (Bitmap) Images Into A Predefined Cell Size Hi De Premor, Yes this pretty much close to what I am looking for. Many thanks. On Thursday, October 3, 2013 10:44:12 PM UTC-4, De Premor wrote: > try this attached file, i hope you can find something there > > On 03-10-201

Re: $$Excel-Macros$$ Date formatting prob! help!

2013-09-20 Thread De Premor
Try To Press Button CTRL + ` (a button before button "1", in the top of TAB button bellow the ESC ) :D Or Goto Menu Formula then deactivate Sub Menu "Show Formulas" On 20-09-2013 22:01, Dawn wrote: Hi! Im updating my skills in excel and have created a spreadsheet with heaps of dates in a col

Re: $$Excel-Macros$$ macro for required data please find the attachment once

2013-09-16 Thread De Premor
Here i'am using Multidimension array to get faster result This will little longer in code, but will much faster then Direct Manipulation Data using For Each ... in Range... Next (Loop) And then... Here we go... Sub Convert() Dim Data, Hasil, LCount As Long, LRow As Long, iCol As Integer

Re: $$Excel-Macros$$ Worksheet to Master - Row consolidation

2013-09-15 Thread De Premor
U're welcome i' stay in Borneo Island (Indonesia) (^_^) Pada 16/09/2013 13:13, Vishwanath menulis: Dear De Premor, I have no words to say thanks.. You are really great. Which place you from? Wish i could meet you some time. rgds vishwanath On 13 September 2013 08:39, De Premor

Re: $$Excel-Macros$$ Query on vlookup

2013-09-13 Thread De Premor
Try this formula *=VLOOKUP(H3,A3:G13,MATCH("TOTAL",$A$2:$G$2,0),0)* On 14-09-2013 11:28, Shrinivas Shevde wrote: Dear All Query on vlookup Please look at the attached sheet. Thanks in advance -- Shrini -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,

Re: $$Excel-Macros$$ Worksheet to Master - Row consolidation

2013-09-12 Thread De Premor
PFA and try to run macro named SAVE on module1 On 29-08-2013 18:57, Vishwanath wrote: Dear Experts. Need your help. the solution can be by using the macros. I have a workbook containing sheet called Indent and master sheet. Indent sheet is form. The contents of the indent sheet to be updated

Re: $$Excel-Macros$$ Populate Values over a range

2013-09-12 Thread De Premor
Try to use Selectionistead of ActiveCell Selection.Value = "Please assist with code" Pada 12/09/2013 18:36, Hilary Lomotey menulis: Hello Experts in the attached i have a marco that puts in values over an active cell. However if i select a range of either non-contiguous range or contiguous

Re: $$Excel-Macros$$ While Not EOF too Slow

2013-09-11 Thread De Premor
Can you share sample text file and workbook ? Pada 11/09/2013 22:42, CesarSan menulis: I have been researching for a quicker way to do the following task, but I couldn´t... Can you please help me with that? It is basically a parser that convert text files into sheets, but the problem is that

Re: $$Excel-Macros$$ Copy values to other worksheet column even if other cells in row contains data

2013-09-11 Thread De Premor
Try this code, please give more attention on RED Color :D Sub RoundedRectangle1_Click() Dim LRow As Long Sheet1.[A10].Formula = "=SUM(A1:A9)" LRow = WorksheetFunction.CountA(Sheet2.Range("*B:B*")) + 1 Sheet2.Cells(LRow, *2*) = Sheet1.[A10] Sheet1.Range("A1:A9").ClearContents E

Re: $$Excel-Macros$$ Copy values to other worksheet column even if other cells in row contains data

2013-09-11 Thread De Premor
U're welcome ;-) Pada 11/09/2013 21:24, georgebeegl...@gmail.com menulis: PERFECT!!!Thanks so much for your assistance the last 2 days. I appreciate it very much. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Faceb

Re: $$Excel-Macros$$ Re: Help Required : How i import Data in Excel from DBF File & Get Max voucher Number

2013-09-11 Thread De Premor
No it's not, that file protected by simple method to prevent user opening it they change the file header structure Try attached DBF, i've repair the header by changing 1st byte on file with correct value. Pada 11/09/2013 21:19, Basole menulis: Hi, the dbf attachment is corrupted. Em quart

Re: $$Excel-Macros$$ Copy values to other worksheet column even if other cells in row contains data

2013-09-11 Thread De Premor
Please send me a sample file with a little explanation there Pada 11/09/2013 20:10, georgebeegl...@gmail.com menulis: Hi De Premor, Thanks so much for the accurate information yesterday. We are currently using that for one of our workbooks. Yesterday, you nailed putting the value into

Re: $$Excel-Macros$$ Copy values to other worksheet column even if other cells in row contains data

2013-09-11 Thread De Premor
Got some great help yesterday from De Premor using VBA to copy data to other worksheets and then using next available row to copy again etc. It works like a charm. But I need some tweaking that I hope is possible. Scenario of worksheet "TOTALS" A B

Re: $$Excel-Macros$$ am getting compile error

2013-09-10 Thread De Premor
Give more attention here ! /Sheets("//*sheet2*//").Range("A10").Value = 1000// / Because you've specified a sheet name, Please make sure you have Sheet named *sheet2 *in current workbook Pada 11/09/2013 12:22, Prabhu Pinky menulis: Hi experts, Please find below simple codes, while i

Re: $$Excel-Macros$$ If cell is blank, it should give error msg

2013-09-10 Thread De Premor
ot; Pada 10/09/2013 22:09, ITP Abdulgani Shaikh menulis: Yes got it, but active sheet is password protected, any solution for that. On Tue, Sep 10, 2013 at 8:29 PM, De Premor <mailto:d...@premor.net>> wrote: If you want to select current sheet, Use*ActiveSheet *to sele

Re: $$Excel-Macros$$ If cell is blank, it should give error msg

2013-09-10 Thread De Premor
partly & guide me, i will try for it Once again thnks On Sep 2, 2013 7:16 PM, "De Premor" mailto:d...@premor.net>> wrote: Ups Sorry, i've forgot a line code for unlocking you sheet protection See at Line 4 and last line that i've bold

Re: $$Excel-Macros$$ Copy Formula Answer to new sheet (next available cell) and REMAIN

2013-09-10 Thread De Premor
Yess that possible by using VBA, just follow attached workbook Pada 10/09/2013 20:23, georgebeegl...@gmail.com menulis: Hi All, I have say a worksheet that is calculating cells A1:A9 with the Total being displayed in cell A10 I want the answer of the Sum Function in cell "A10" to be copied to

Re: $$Excel-Macros$$ copy data & paste into new worksheet or book & save into folder

2013-09-08 Thread De Premor
Try This Sub WbSpliter() Dim Sh As Worksheet, Keys, LRow As Long Const SavePath As String = "C:\Workbook" Set Sh = ActiveSheet Key = Sh.Range("R2:" & Sh.Range("R2").End(xlDown).Address).Value2 Application.DisplayAlerts = False MakeDir SavePath For LRow = LBound(Key

Re: $$Excel-Macros$$ excel deta formate change vertical to horizontal?

2013-09-07 Thread De Premor
Using Macro Sub createdata2() Dim Dst As Worksheet, Rng As Range Dim iCol As Integer, LRow(1 To 99) As Long Worksheets.Add after:=Sheets(Worksheets.Count) Set Dst = ActiveSheet On Error Resume Next For Each Rng In Sheet1.UsedRange If InStr(1, Rng, ":") > 0 Then

Re: $$Excel-Macros$$ Urgent Help Required (Counta)

2013-09-06 Thread De Premor
The good thing is that your sheet name have a same name with what we are looking for also the name of month, so we can process it easily, try this on B2 =COUNTA(OFFSET(INDIRECT($A2&"!$A1" ),2,MATCH(B$1,INDIRECT($A2&"!$1:$1"),0)-1,2^16)) On 07-09-2013 12:43, Ashish Kumar wrote: Dear Seniors,

Re: $$Excel-Macros$$ Macro for Hide Column

2013-09-06 Thread De Premor
Try this ! Sub HideYes() Dim Rng As Range For Each Rng In Range("A2:E2") If InStr(1, LCase(Rng), "yes") > 0 Then Rng.EntireColumn.Hidden = True Next End Sub On 07-09-2013 10:46, Prafull Jadhav wrote: Dear All, Very Good Morning I have one Query . i am looking in Range (

Re: $$Excel-Macros$$ If cell is blank, it should give error msg

2013-09-02 Thread De Premor
Ups Sorry, i've forgot a line code for unlocking you sheet protection See at Line 4 and last line that i've bold Sub check() Dim Birth As Range, PANo As Range, UserInput, Arr Set Birth = [G2] Set PANo = [j2] *Sheet5.Unprotect *If IsEmpty(Birth) Then Birth.Interior.Col

Re: $$Excel-Macros$$ If cell is blank, it should give error msg

2013-09-02 Thread De Premor
Try this Sub check() Dim Birth As Range, PANo As Range, UserInput, Arr Set Birth = [G2] Set PANo = [j2] If IsEmpty(Birth) Then Birth.Interior.Color = 255 Birth.Interior.Pattern = xlSolid If MsgBox("Birth Date is empty, Do you want to enter data now ?", vb

Re: $$Excel-Macros$$ Re: Query on Text to Columns function

2013-08-31 Thread De Premor
Try this code Sub Macro1() Dim Data As Range Application.DisplayAlerts = False Set Data = Range("C2", Range("C2").End(xlDown).Address) Data.TextToColumns Data.Offset(, 1), OtherChar:=".", FieldInfo:=Array(Array(1, 2), Array(2, 2), Array(3, 2)) Application.DisplayAlerts = Tru

Re: $$Excel-Macros$$ I need help with making a macro relative to a selection field within the macro

2013-08-30 Thread De Premor
Try to using Offset Ex: Before you run your code, active / selected cell was on C3, then try to run this code Sub Tes() ActiveCell.Offset(1,0).Select'Move 1 Cell Down Stop'See Your Current Selected Cell Now, then back here and press F8 ActiveCell.Offset(0,1).Select'Mov

Re: $$Excel-Macros$$ I need help with making a macro relative to a selection field within the macro

2013-08-30 Thread De Premor
sorry, On Red Bold i mean ActiveCell.Offset(1,1) On 31-08-2013 0:56, De Premor wrote: Try to using Offset Ex: Before you run your code, active / selected cell was on C3, then try to run this code Sub Tes() ActiveCell.Offset(1,0).Select'Move 1 Cell Down Stop'See Yo

Re: $$Excel-Macros$$ Counting the number of times in a range

2013-08-30 Thread De Premor
Try this attached sample, and let us know if it solve your problem On 30-08-2013 1:15, Diannaha Thompson wrote: Ok so I have this list of times 7am, 8am, 7:30, 9, 9:20am and etc. for example. I need to count how many times occur in a range. So 7:00-7:59 occurs twice 8am-8:59 occurs once. I have

Re: $$Excel-Macros$$ Re: Copy data to next empty row

2013-08-30 Thread De Premor
Have you try something like bellow ? Sub NextEmpty() Range("A37").End(xlDown).Offset(1).Select End Sub Rgds, [dp] Pada 30/08/2013 14:35, Ravi Kumar menulis: Yes, that’s perfect // */Warm Regards,/* */Ravi Kumar./* *From:*excel-macros@googlegroups.com [mailto:excel-macros@googlegroups

Re: $$Excel-Macros$$ Output Requier in Vertical

2013-08-27 Thread De Premor
Different method to get little faster Sub Amit() Dim Data As Range, Buffer() Dim iRow As Long, iCol As Long, iCount As Long Dim tStart As Double tStart = Timer Set Data = Range("A1").CurrentRegion ReDim Buffer(1 To Data.Count, 1 To 2) For iRow = 2 To Data.Rows.Count

Re: $$Excel-Macros$$ Extracting data from a string of text to another cell

2013-08-26 Thread De Premor
Try this macro Sub Pierre() Dim Rng As Range, Data As Range, iLeft As Integer Set Data = Selection For Each Rng In Data iLeft = InStr(1, Rng, "(") + 1 If iLeft > 1 Then Rng.Offset(0, 1) = Mid(Rng, iLeft, InStr(1, Rng, ")") - iLeft) Rng.Offset(0,

Re: Fwd: $$Excel-Macros$$ Extra Space & Enter to be removed from a cell

2013-08-26 Thread De Premor
ve it, we can use TRIM Function to do that job. Thats All Pada 26/08/2013 17:49, Pravin Gunjal menulis: Thanks DP for your immediate response. Could you please inform the meaning of this formula for my understanding. Regards Pravin Gunjal. -- Forwarded message -- From:

Re: $$Excel-Macros$$ Extra Space & Enter to be removed from a cell

2013-08-26 Thread De Premor
try this formula =TRIM(SUBSTITUTE(C2,CHAR(10)," ")) Pada 26/08/2013 17:33, Pravin Gunjal menulis: Hello, Can I get help from you to remove extra space / enter from column "C" in the attached sheet. Pl do the needful. Regards Pravin Gunjal. -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel

Re: $$Excel-Macros$$ Formula or UDF to do Vlookup for values delimited with ]

2013-08-25 Thread De Premor
If Kode <> "" Then Tmp = Tmp & WorksheetFunction.VLookup(Kode, Data, Colx, 0) & IIf(RemoveDelimiter, " ", Delim) End If Next LookForCode = Trim(Tmp) End Function Pada 25/08/2013 14:43, prkhan56 menulis: Dear De Premor, One small request

Re: $$Excel-Macros$$ Tricky tricks - 1

2013-08-23 Thread De Premor
f records than? . Enjoy Team XLS On Mon, Jul 29, 2013 at 9:41 PM, Secret Shot <mailto:secrets...@gmail.com>> wrote: Put "=" sign in cell A2 itself at the bagining of the text... :P On Sun, Jul 28, 2013 at 1:46 PM, De Premor mailto:d...@premor.net>> wrote:

Re: $$Excel-Macros$$ Behind code of Sum function in VBA

2013-08-23 Thread De Premor
Hi Pavan, Try this rev code Function xSum(ParamArray Numbers()) As Variant Dim BlockRange, SingleRange, Buffer For Each BlockRange In Numbers If WorksheetFunction.IsNumber(Evaluate(BlockRange)) Then Buffer = Buffer + BlockRange Else For Each SingleR

Re: $$Excel-Macros$$ Behind code of Sum function in VBA

2013-08-22 Thread De Premor
Try this and explore it Function xSum(ParamArray Numbers()) As Variant Dim BlockRange, SingleRange, Buffer For Each BlockRange In Numbers For Each SingleRange In BlockRange Buffer = Buffer + SingleRange Next Next xSum = Buffer End Function Pada 22/08/

Re: $$Excel-Macros$$ define sort range

2013-08-22 Thread De Premor
try this code Sub sort() Dim Str() As String Str = Split([G4], ":") With ActiveSheet.sort .SortFields.Add Key:=Range(Str(0)) .SetRange Range([G4]) .Apply End With End Sub Pada 22/08/2013 18:39, Pekon menulis: Dear experts I hope that you can help me. I

Re: $$Excel-Macros$$ How to split Data based on last comm,

2013-08-21 Thread De Premor
Another simple and short =TRIM(RIGHT(SUBSTITUTE(A2,",",REPT(" ",99)),99)) Pada 21/08/2013 16:12, Andrew Mangozho menulis: Another simpler but rather long method to get the same result On Tue, Jul 30, 2013 at 4:31 AM, Waseem Saifi > wrote: Dear Rajkumar,

Re: $$Excel-Macros$$ Formula or UDF to do Vlookup for values delimited with ]

2013-08-20 Thread De Premor
try to replace current code with this Function LookForCode(Str As String, Data As Range, Colx As Integer, Optional Delim As String = "]") Dim Kode, Tmp As String For Each Kode In Split(Str, Delim) If Kode <> "" Then Tmp = Tmp & " " & WorksheetFunction.VLookup(Kode, Data, Colx,

Re: $$Excel-Macros$$ Need help - How to enter the text in the cells of column by using textbox in userform

2013-08-19 Thread De Premor
paste this on userform1 ' Dim Target As Range Private Sub CommandButton1_Click() Target.Offset(1).Select Unload Me End Sub Private Sub TextBox1_Change() Target = TextBox1.Text End Sub Private Sub UserForm_Activate() Set Target = Selection TextBox1.Text = Tar

Re: $$Excel-Macros$$ Need urgent help on macro error.

2013-08-18 Thread De Premor
Try to add this Dim FSO as Object Then replace your line code to : Set FSO = CreateObject("Scripting.FileSystemObject") On 19-08-2013 5:38, Indrajit $nai wrote: Hi All, Kindly find attached the macro based data collection file. But when I am running the macro it's showing the some error. K

Re: $$Excel-Macros$$ check date on open file

2013-08-14 Thread De Premor
Try This Private Sub Workbook_Open() If Now() > #8/18/2013# Then AnotherCode Else CurrentCode End If End Sub Sub AnotherCode() MsgBox "This Your Another Code" End Sub Sub CurrentCode() MsgBox "This Your Current Code" End Sub On 14-08-2013 16:45, pawel lupi

Re: $$Excel-Macros$$ macro need

2013-08-09 Thread De Premor
paste this on macro Sheets2 Private Sub Worksheet_Change(ByVal Target As Range) Dim iRow As Integer, Dst As Range If Target.Address = "$B$3" Then [A6].CurrentRegion.Clear Range("A6:E6") = Split("sno,Amount,int,monthly pay,int + monthly pay", ",") For iRow = 1 To

Re: $$Excel-Macros$$ Text to Column Vai VBA code

2013-08-09 Thread De Premor
Split(Replace(Replace(Replace(x.Text, "Days ", ""), "Hrs ", ""), "Mins", ""), " ") Next End Sub Once again Thanks . Regards, Prafull Jadhav. On Sat, Aug 10, 2013 at 6:29 AM, De Premor <mailto:d...@premor.net>> wrote:

Re: $$Excel-Macros$$ Text to Column Vai VBA code

2013-08-09 Thread De Premor
understand *Sub x() Dim Rng As Range, _Str() As Variant_* *_ _For Each Rng In Range("A3:A" & Range("A3").CurrentRegion.Rows.Count) _If InStr(1, Rng, "Days") > 0 Then_ Range("B" & Rng.Row & ":D" & Rng.Row) = _ Split(Replace(Replace(Re

Re: $$Excel-Macros$$ Text to Column Vai VBA code

2013-08-09 Thread De Premor
Try This ! Sub x() Dim Rng As Range, Str() As Variant For Each Rng In Range("A3:A" & Range("A3").CurrentRegion.Rows.Count) If InStr(1, Rng, "Days") > 0 Then Range("B" & Rng.Row & ":D" & Rng.Row) = _ Split(Replace(Replace(Replace(Rng.Text, "Days ", ""), "Hrs

Re: $$Excel-Macros$$ Re: Convert number of days to month and day (ie, 035 = 2/4)

2013-08-08 Thread De Premor
Hi Don, try this Sub x() Dim Dtx As Range, dDtx As Integer, dYear As Integer For Each Dtx In Range("D2:D" & Range("D2").CurrentRegion.Rows.Count + 1) If Left(Dtx, 3) = "&>0" Then dDtx = Mid(Dtx, 6, 3) * 1 dYear = "20" & Mid(Dtx, 4, 2) Dtx.Form

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-07 Thread De Premor
To accomodate that, the easiest way is to put your keyword to a sheet, Let say your array placed in sheet named MyArrayInSheet starting on range A1 to A1000, then use this function : Sub Button1_Click() Dim Rng As Range ActiveSheet.Range("A1").Select Do For Each Rng In Sheet

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread De Premor
file to fill the array? I have about 900 lines/phrases/items. It wont let me use that big of an array or too many line continuations. Help? =) On Tuesday, August 6, 2013 10:35:01 PM UTC-4, De Premor wrote: Try to change to Uppercase or Lowercase the test string and the sentences

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread De Premor
Try to change to Uppercase or Lowercase the test string and the sentences In Ex: If InStr(1, UCase(Selection), Ucase(Str)) > 0 Then Selection.EntireRow.Delete Pada 06/08/2013 23:41, Spencer Patterson menulis: Aside from the crazy windings text, that did the trick! Thank you so much! Is the

Re: $$Excel-Macros$$ Macro to delete row with specific phrase

2013-08-06 Thread De Premor
Sub Button1_Click() Dim Rng As Range, Str Range("A1").Select Do For Each Str In Array("Friendly's", "Ruth's Chris Steak House", "Hooters", "Ruby Tuesday", "Chili's Grill & Bar") If InStr(1, Selection, Str) > 0 Then Selection.EntireRow.Delete Next S

Bls: Re: $$Excel-Macros$$ vba script to convert excel to json format

2013-08-05 Thread De Premor
: $$Excel-Macros$$ vba script to convert excel to json format Pretty much that's exactly what I need to do. Would it be helpful if I provided a sample file? Regards, Godiva. On Mon, Aug 5, 2013 at 3:47 PM, De Premor wrote: > I dont know is that exist, but after reading a while about JSO

Re: $$Excel-Macros$$ vba script to convert excel to json format

2013-08-05 Thread De Premor
I dont know is that exist, but after reading a while about JSON Format, i think we can do some simple translation on Excel Data to something looklike bellow { "Sheet1": { "title": "Your Sheet Name Here", "Data": { &quo

Re: $$Excel-Macros$$ LEFT function Trouble !!! HELP PLZ !!!

2013-08-05 Thread De Premor
Try this Private Sub CommandButton1_Click() Dim Rng As Range For Each Rng In Range("C1:C20") If Rng <> "" Then Rng.Offset(, 2) = IIf(Left(Rng, 1) = "`", "Tax", "Retail") Next End Sub Pada 05/08/2013 16:26, SAJID MEMON menulis: Dear I am making a small error in my file, onl

Re: $$Excel-Macros$$ VBA for Data Validation Question

2013-08-01 Thread De Premor
Just trying to imagine with your problem since there is no file attached to explore the other scene. PFA my first approach, is that close with your ? Pada 01/08/2013 8:54, RJQMAN menulis: I have a complex program I wrote in Excel 2003 about six years ago, and I am working to update it. In the

Re: $$Excel-Macros$$ Help Opening in folder using general path

2013-08-01 Thread De Premor
.xls" Set oWSHShell = Nothing Workbooks.Open Filename:=*OpenFile* End Sub Pada 01/08/2013 18:59, De Premor menulis: Try this Sub tes() Dim oWSHShell As Object, OpenFile As String Set oWSHShell = CreateObject("WScript.Shell") OpenFile = oWSHShell.Specia

Re: $$Excel-Macros$$ Help Opening in folder using general path

2013-08-01 Thread De Premor
Try this Sub tes() Dim oWSHShell As Object, OpenFile As String Set oWSHShell = CreateObject("WScript.Shell") OpenFile = oWSHShell.SpecialFolders("Desktop") & "\data_source\week_to_date-export.xls" Set oWSHShell = Nothing Workbooks.Open Filename:=SaveDest End Sub Pada 01/

Re: $$Excel-Macros$$ want open first sheet while open sheet

2013-08-01 Thread De Premor
Sorry ignore my last email, i just opening the macros code in your workbook, and find that you have do it right, but in wrong place Try to place that code in ThisWorkbook not in Sheet1 Pada 01/08/2013 17:34, De Premor menulis: Hi Hemal, in your first email you said: *I want that, Menu sheet

Re: $$Excel-Macros$$ want open first sheet while open sheet

2013-08-01 Thread De Premor
Hi Hemal, in your first email you said: *I want that, Menu sheet is to be open every time when I open excel file.* Thaat why Priti give a code like this ! Worksheets("Menu").Activate But in your real workbook, you dont have a sheet named *"Menu"*m but you have sheet named "*INDEX*" Try to chan

Re: $$Excel-Macros$$ Query Regarding Sum

2013-07-31 Thread De Premor
You can also use this =SUM(OFFSET(E6,1,MATCH(B2,F6:M6,0),MATCH(B3,E7:E10,0))) Pada 01/08/2013 13:00, Waseem Saifi menulis: thank you so much ravinder. it's working absolutely fine. On Thu, Aug 1, 2013 at 11:15 AM, ravinder negi > wrote: you can use =

Re: $$Excel-Macros$$ Copy Data from Reference file to Master file

2013-07-30 Thread De Premor
you may share your current code, maybe we can find whats wrong with it Pada 30/07/2013 18:36, Puttu * menulis: Really i tried my best, but didn't worked out. thus the reason seeking for help On Tue, Jul 30, 2013 at 3:59 PM, De Premor <mailto:d...@premor.net>> wrote: Hi Pu

Re: $$Excel-Macros$$ Copy Data from Reference file to Master file

2013-07-30 Thread De Premor
Hi Putu, While you're waiting for a groups response, why dont you start writing your own code, you might want to read more about : Select a file using Application.GetOpenFilename Open a workbook using Workbooks.Open Assign a value to variable using Set... = Looping each worksh

Re: $$Excel-Macros$$ VBA remove character at beginning and end of string (cell)

2013-07-29 Thread De Premor
try this code Sub trunkit() Dim Ctx As Range 'We use this method to get dynamic Record count in C Column For Each Ctx In Range("C2:" & Cells(Range("C:C").Rows.Count, 3).End(xlUp).Address) If Right(Ctx, 2) = "00" Then 'Replace "=" sign, from removed 00 string

Re: $$Excel-Macros$$ Re: Introduce Yourself !!

2013-07-29 Thread De Premor
just remember, that i also not yet introduce my self :( then let me introduce my self You can call me *De* *Premor* and i am working in Network and Infrastucture Division at intermediate Palm and Oil Mills in beautiful Borneo, Indonesia, i love to learn programming in my spare time since i

Re: $$Excel-Macros$$ need vlookup formula help

2013-07-29 Thread De Premor
Try to use this in cell B2 *=VLOOKUP($A2,INDIRECT("'" &B$1 & "'!$B$2:$R$302"),16,FALSE)** * Copy it down Pada 29/07/2013 18:22, Dhaval Shah menulis: here with attach a file for reference On Mon, Jul 29, 2013 at 4:49 PM, Dhaval Shah > wrote: Friends ,

Re: $$Excel-Macros$$ Copy Data from Reference file to Master file

2013-07-29 Thread De Premor
ups sorry, please ignore my last email, i've replied a wrong topic My bad :-\ Pada 29/07/2013 19:37, De Premor menulis: Try to use this in cell B2 *=VLOOKUP($A2,INDIRECT("'" &B$1 & "'!$B$2:$R$302"),16,FALSE)** * Copy it down Pada 27/07/2013 20:44, P

Re: $$Excel-Macros$$ Copy Data from Reference file to Master file

2013-07-29 Thread De Premor
Try to use this in cell B2 *=VLOOKUP($A2,INDIRECT("'" &B$1 & "'!$B$2:$R$302"),16,FALSE)** * Copy it down Pada 27/07/2013 20:44, Puttu * menulis: Experts your assistance is much appreciated. On Sat, Jul 27, 2013 at 4:55 PM, Puttu * > wrote: Hi Experts, Ne

Re: $$Excel-Macros$$ how to make a file expire after a period of time.

2013-07-29 Thread De Premor
m hh:mm:ss AM/PM") End Sub Rgds, [dp] On 29/07/2013 15:39, Kannan Excel wrote: can u do me a favor??? i don't want user and pswd... i want vb coding for expire date and time pls send that code how to set date and time to expire On Mon, Jul 29, 2013 at 1:16 PM, De Premor <mailto

Re: $$Excel-Macros$$ how to make a file expire after a period of time.

2013-07-29 Thread De Premor
set particular date and* time* also for expire is this possible.??? Or i want to set date and time for password... When i set date and time, password will appear automatically pls do the needful ASAP... On Sat, Jul 27, 2013 at 3:19 PM, De Premor wrote: Using macro, but required

Re: $$Excel-Macros$$ Tricky tricks - 1

2013-07-28 Thread De Premor
create defined name inexample : "*Eval**A2*" that referring to =EVALUATE(A2) Then in some cell in that sheet, just type *=EvalA2** * Pada 28/07/2013 14:59, xlstime menulis: and what about formula . Enjoy Team XLS On Sun, Jul 28, 2013 at 11:10 AM,

Re: $$Excel-Macros$$ Tricky tricks - 1

2013-07-27 Thread De Premor
using udf On Cell A3, type*=Eval(A2)* then, on VBE, add module and paste this code *Function eval(str As String)** **eval = Evaluate(str)** **End Function** *:-X On 28/07/2013 12:09, xlstime wrote: Hi All, How to Evaluate cell value. let assume that, in cell A2 - '1+2+3+4' now how to su

Re: $$Excel-Macros$$ Date doubt

2013-07-27 Thread De Premor
Let me ask before answering you with the code If i change the date to 30 June 2013, what will appear in quarter, half and year ? Pada 27/07/2013 15:00, Kenil Gala menulis: hi, Thank you very much De premor for your time and efforts. but,one problem I am facing now is when I changed the

Re: $$Excel-Macros$$ how to make a file expire after a period of time.

2013-07-27 Thread De Premor
Using macro, but required user to run the macro This is the basic, user still can skip this by changing date on his computer Private Sub Workbook_Open() Dim Expired As Date Expired = "20 Jul 2013" If Now() > Expired Then MsgBox "File " & ThisWorkbook.FullName & " expired"

Re: $$Excel-Macros$$ For Each..Next . Help finding a number in data

2013-07-26 Thread De Premor
Hi Hammod, please try attached macro Rgds, [dp] On 26/07/2013 10:32, ha...@mst.edu wrote: Hi All I'm trying to write an excel vba code that return a number with respct to the value of the 2nd number. There are 5 number copied into one column(it has to be one column,project requiremnt) and if

Re: $$Excel-Macros$$ Date doubt

2013-07-26 Thread De Premor
ans from 28 dec 2012 - 28march 2013, and 29 march 2013 to 27june 2013 half year means for eg : 28dec 2012 - 27june 2013, then 28 june 2013 to 26dec2013 yearly means 28dec2012 - 26dec 2013 any month starts from last Friday of the month and ends on last Thursday of next month. this is the pattern o

Re: $$Excel-Macros$$ Date doubt

2013-07-26 Thread De Premor
any month starts from last Friday of the month and ends on last Thursday of next month. this is the pattern of contracts followed in indian stock markets. Pls find the file attched. Thanks in adv. *From:* De Premor *To

Re: $$Excel-Macros$$ Date doubt

2013-07-25 Thread De Premor
First Approach This function is to find first Friday on every given range, is this match to your requirement ? if not, please reply with data and date as you want on each range. Confuse on this statement "month from last Friday to last Thursday of the month.", sample data needed. Function fin

Re: $$Excel-Macros$$ Macro for Concatenate

2013-07-25 Thread De Premor
is running till data in A column ..by using Next Thanks again Sir... I .get more this when I do practice on the same. Reg, Prafull On Thu, Jul 25, 2013 at 12:19 PM, De Premor <mailto:d...@premor.net>> wrote: *Offset ([row], [column])* lets say i => Range B3 =>

  1   2   >