Re: $$Excel-Macros$$ Is it mandatory to keep the excel file as macro enable (if inside having macro) ?

2014-08-09 Thread Paul Schreiner
If you have macros in the file, then Yes, you must save it as either .xlsm, .xlsb or .xls (Office-97) If you save it as .xlsx, then all macros will be removed. It has been my experience that files saved in .xlsb format are smaller. Even though they may not have macros. In addition, macros that t

Re: $$Excel-Macros$$ need help!!!

2014-08-08 Thread Paul Schreiner
First of all, I think there's some things we both need to understand.  There are "regional" settings in Excel that allow for some standard conventions. For instance:  in different parts of the world, 2 and 1/4 is represented as 2.25 or as 2,25 So, is your designation of 23,54 using a "," as a f

Re: $$Excel-Macros$$ make 10 digit data

2014-08-06 Thread Paul Schreiner
You can simply use a formula like: =IF(A2<>"",SUBSTITUTE(TEXT(A2,"0-000-000-000"),"919-","9-"),"") and copy down/across.   Why do you want a macro? Do you know how to write macros? If not, then you're asking one of us to write it for you, you'll have to provide much more information.   How many ro

Re: Fwd: $$Excel-Macros$$ Need VBA code to convert multi-pages PDF file into multiple sheets Excel Spreadsheet

2014-08-04 Thread Paul Schreiner
I'm not sure how this relates to pdf files. Or has the original discussion thread been "highjacked"?  Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people y

Re: $$Excel-Macros$$ URGENT : Help on excel for matching data

2014-07-25 Thread Paul Schreiner
on what I am looking for.. > >Please help > >Regards, Bhanu > > > > > > > >On Fri, Jul 25, 2014 at 5:08 PM, Paul Schreiner wrote: > >It looks like you've already got it set up. >>You're using column A in the Source sheet to concatenate the Group,mo

Re: $$Excel-Macros$$ Need help in creating macro

2014-07-25 Thread Paul Schreiner
I suspect that what you've provided is a data sample that may not be realistic.   Will the values in the "Reader" column actually SAY "In" and "Out"? or are these clock rings from users? and, the date/time for each "IN" ring is probably not the exact time for the corresponding "OUT" ring. I can w

Re: $$Excel-Macros$$ URGENT : Help on excel for matching data

2014-07-25 Thread Paul Schreiner
It looks like you've already got it set up. You're using column A in the Source sheet to concatenate the Group,month and location. you need to add the FBC value to this column, however you'll probably want to round the FBC number to 2 decimal places: =E3&B3&D3&Round(F3,2)   in your data match she

Re: $$Excel-Macros$$ Getting syntax error for a basic vba code

2014-07-24 Thread Paul Schreiner
 It looks like the code you copied was modified by an editor. Some editors use what is called "smart quotes"   The instead of simple double-quotes (") they use an "opening quote" (“) and a "closing quote" (”) so your quoted string looks like: “Is your name ” These quote are not allowed in VBA. s

Re: $$Excel-Macros$$ Plz automation help

2014-07-23 Thread Paul Schreiner
Are you wanting someone to write it for you or give you guidance in writing it? Either way, what you've given us is insufficient to complete the task. The way I usually handle it is with a Dictionary Object. I read in the "Master file" and store the record "index" and row number in a Dictionary

Re: $$Excel-Macros$$ Protect shared workbook

2014-07-23 Thread Paul Schreiner
It's possible that the other users have their macro settings set for a prompt when opening and select to disable macros.   There's a couple of ways to handle this:   Lock and protect the entire sheet, or even hide it. Create a workbook_Open event that unhides or unprotects the sheet. If they've di

Re: $$Excel-Macros$$ Merge Word Documents through EXCEL VBA

2014-07-21 Thread Paul Schreiner
Are you saying you want to copy the CONTENT of the Word Documents to an Excel  workbook? or append each of the Word Documents to a new Word document?  Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you c

Re: $$Excel-Macros$$ Indirect Function Not Working on Dates Please Help

2014-07-21 Thread Paul Schreiner
you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley - > > From: Paul Schreiner >To: "excel-macros@googlegroups.com" >Sent: Monday, July 21, 201

Re: $$Excel-Macros$$ Indirect Function Not Working on Dates Please Help

2014-07-21 Thread Paul Schreiner
hope it helps. Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----- From: Paul Schreiner

Re: $$Excel-Macros$$ Indirect Function Not Working on Dates Please Help

2014-07-21 Thread Paul Schreiner
 For your sumif(Indirect function in cell B5, try:   =SUMIF(INDIRECT("'"&TEXT($A5,"dd-mm-")&"'!C18:C40"),B$3,INDIRECT("'"&TEXT($A5,"dd-mm-")&"'!F18:F40"))  (It should copy to D, F, H, J also) Paul - “Do all the good you can, By all the means you can,

Re: $$Excel-Macros$$ run-time error '1004': Reference is not valid.

2014-07-21 Thread Paul Schreiner
First of all, if you saved it as a "macro enabled workbook file", that means you saved it as a .xlsm file. If so, they could NOT have opened the file with a version of Excel prior to 2010. So, that just leaves a "newer" version, which I wouldn't jump to immediately.   Which line is showing the err

Re: $$Excel-Macros$$ US$ currency Format

2014-07-18 Thread Paul Schreiner
This seems to have nothing to do with currency.   it's simply a number. ANY number can be displayed in any way you wish. Simply right-click on the cell and select  "Format Cells". then, If you want the $, then you can select "Currency"   If you simply want it to be numeric, select "Custom" and one

Re: $$Excel-Macros$$ VBA to populate cells based on cirteria

2014-07-16 Thread Paul Schreiner
esday, July 16, 2014 9:41 AM >Subject: Re: $$Excel-Macros$$ VBA to populate cells based on cirteria > > > >Hi Paul. This works quite well. Such a solution with well explanation! >Thank you! > > > > >On Wed, Jul 16, 2014 at 11:07 PM, Paul Schreiner >wrote: &g

Re: $$Excel-Macros$$ VBA to populate cells based on cirteria

2014-07-16 Thread Paul Schreiner
  I used this formula in Cell E2:   =IF(OR((COLUMN()-4)=$C3,MOD((COLUMN()-4)-$C3,$D3)=0),$B3,"")   then copied it to the other cells.   Basically, it uses two concepts: the "Data" portion occupies (4) cells. A:D, so the column for year 1 is in column E. so, column() - 4 gives the "Year Number" of 1

Re: $$Excel-Macros$$ Add Control On button click on Page

2014-07-15 Thread Paul Schreiner
not clear enough. >I want add 5 text boxes on each time button click.   > > > > > > >On Mon, Jul 14, 2014 at 5:13 PM, Paul Schreiner wrote: > >I'm sorry, there just doesn't seem to be enough information to figure out what >it is you want to do! >>

Re: $$Excel-Macros$$ Add Control On button click on Page

2014-07-14 Thread Paul Schreiner
I'm sorry, there just doesn't seem to be enough information to figure out what it is you want to do!   Are you saying you wish to add information to the worksheet when you hit the button? or are you wanting to create another set of text boxes on the userform?   If you're wanting to create new tex

Re: $$Excel-Macros$$

2014-07-09 Thread Paul Schreiner
I'm not sure what's causing the confusion.   there are two questions:   Can we record a looping statement ?   the answer is "No".  The question concerns utilizing the macro recorder to record actions in order to determine the VBA statements required to perform specific tasks. A "looping statement"

Re: $$Excel-Macros$$ Formula Required

2014-07-08 Thread Paul Schreiner
I'm sorry, but your explanation is confusing. Can you give an example?   Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you c

Re: $$Excel-Macros$$ Help required on Macro

2014-06-30 Thread Paul Schreiner
my first suspicion is that your 2010 application hasn't been set to "trust the VBA object model".   Because just about everything in 2007 is available in 2010.  but your error seems to imply a permission to create a userform object. for which you would need to VBA trust setting set.   Look at:   F

Re: $$Excel-Macros$$ How to remove vb code after you make a copy

2014-06-27 Thread Paul Schreiner
Try adding this code:       With ActiveWorkbook.VBProject     For x = .VBComponents.Count To 1 Step -1     If (.VBComponents(x).Name = "Report") Then     .VBComponents(x).CodeModule.DeleteLines _     1, .VBComponents(x).CodeModule.CountOfLines     End If

$$Excel-Macros$$ Re: Extract duplicate data and run calculation- macro request

2014-06-26 Thread Paul Schreiner
Would you please send me a file with a larger sample? schreiner_p...@att.net I just need the name, price and date columns, you can clear the rest. I'd LIKE the full 50,000+ lines. There's a couple of approaches I'd like to try, but the time to process a large number may be significant. also,

Re: $$Excel-Macros$$ Excel VBA Password Issues/ Cannot view the code

2014-06-20 Thread Paul Schreiner
the company and now i need the code >behind in order to work further. I am not violating any policies dear. Please >help me out if you could. please > > > >On Fri, Jun 20, 2014 at 4:17 AM, Paul Schreiner wrote: > >Really? >> >>#1) He said: " I cant pass the sh

Re: $$Excel-Macros$$ Excel VBA Password Issues/ Cannot view the code

2014-06-20 Thread Paul Schreiner
Really?   #1) He said: " I cant pass the sheet as it can lead to violations on company side" #2) I'm sorry, it's a violation of group policy #3:    3) Don't post questions regarding breaking or bypassing any security measure   The reason is that we do not want to assist someone stealing another's

Re: $$Excel-Macros$$ Need VBA code to track log off and log on Time

2014-06-19 Thread Paul Schreiner
That's actually not that easy to do.   The problem is that you're dealing with Windows Events. Many Windows events (login, screen locking, etc) write to a system log. but many of these are set up by the workstation "Policies".   The policies are handled by the network system administrator.   Depend

Re: $$Excel-Macros$$ Want Excel formula to Omit saturday sunday!

2014-06-17 Thread Paul Schreiner
Here we can make use of a couple of different concepts: #1) Excel stores dates as numbers (the number of days since 1/1/1900).   So, if your date (June 3, 2014) is in cell A1, the date 9 days previous to that is A1-9   #2) The Excel function Weekday() returns the "day number" of the weekday.  

Re: $$Excel-Macros$$ Re: If then

2014-06-16 Thread Paul Schreiner
Wait... just be clear... Are you using RangeName1 as a variable that contains the name of a Named Range? or is "RangeName1" the name of a range?   also, I can see why it might have a problem with:   Selection.SpecialCells(xlCellTypeFormulas, 16).Select     since I have no idea what that line is sup

Re: $$Excel-Macros$$ If then

2014-06-16 Thread Paul Schreiner
What you're describing is reminscent of some old Fortran style IF statments.   In VBA you CAN use goto's, but it's not really all that common. In fact, I think they're only keeping them around for backward compatibility.   I THINK the equivalent to what you've described is:   If RangeName1 < 16 the

Re: $$Excel-Macros$$ Date Format Query

2014-06-16 Thread Paul Schreiner
Guys:   I started with the same response, until I noticed that I believe what he's saying is that the value in the cell is NOT an Excel date:   He said:  "Now it is not in system's date format"   so, he cannot change the display format to display it in another date format.   the solution using the

Re: $$Excel-Macros$$ Re: How to pause the Excel VBA macro at certain point and then start again

2014-06-12 Thread Paul Schreiner
f infinitive loop. I tried to find out why and what I found is that after >couple of looping on this line "Set wb4 = Workbooks("RNsOutstanding[1]. csv")" >it throws out a Subscript out of Range error and it never sets wb4 again. When >I run in break mode it works. >

Re: $$Excel-Macros$$ Re: How to pause the Excel VBA macro at certain point and then start again

2014-06-12 Thread Paul Schreiner
Did you TRY what I described? or even Ravinder's suggestion of Browser.busy or Browser.ReadyState?   There are two things: You SAID that Application.Wait does not work. When used properly, Application.Wait DOES work, it just might not help in your case.   The second thing is the infinite loop. Th

Re: $$Excel-Macros$$ help: someone help me crack the password for these 2 macro files?

2014-06-12 Thread Paul Schreiner
You really shouldn't expect much help from this group in this case, since it violates Forum Rule #3:   There are LOTS of places on Google that you can find people who willingly allow someone to steal someone else's work.   (5,340,000 hits on "Break Excel password")    I know, you aren't trying to

Re: $$Excel-Macros$$ How to pause the Excel VBA macro at certain point and then start again

2014-06-10 Thread Paul Schreiner
I'd try a combination of the Application.Wait and a loop to check to see if the download file is ready. Depending on file size, I'd probably check the size of the download file. then wait for 5 seconds, and check again. If the file size changes, then wait again until the file size no longer chan

Re: $$Excel-Macros$$ Convert Text to xls or xlsm

2014-06-03 Thread Paul Schreiner
t; > > > > > > > >    >  > >N.SHIVKUMAR >Mobile : +919422613567 >Office  : +912332301775 >Alternate Email: shiv1...@yahoo.com > > > > > > > > > >On 3 June 2014 16:55, Paul Schreiner wrote: > >Are you wanting a macro to im

Re: $$Excel-Macros$$ Average of Average in Excel

2014-06-03 Thread Paul Schreiner
probably, but why? the number usually isn't valuable.   if you have a set of 100 numbers, and the average is 10  another set of 500 numbers, and the average is 20 and a set of 1000 numbers and the average is 30 the average of the averages is ( 30+20+10 ) / 3 = 20 but in actuality, the overall ave

Re: $$Excel-Macros$$ Convert Text to xls or xlsm

2014-06-03 Thread Paul Schreiner
Are you wanting a macro to import it? or one-time?   Do you want the different sets on different sheets?   If you want it one-time, I'd open the file in excel and use a space and "!" as delimeters.   you'll need to clean up the headers.   If you're looking for a macro, let me know what approach yo

Re: $$Excel-Macros$$ Trying to group/flag data of same value together in sets

2014-06-02 Thread Paul Schreiner
 I'm having some difficulty following what you're trying to do.   Your description implies that there are multiple records (1,2,3) for a given name. and, it seems that there should be multiple occurences of the id/name combination which you wish to make unique by adding A-D to the ID's.   But you

Re: $$Excel-Macros$$ Over 33,554 rows problem

2014-06-02 Thread Paul Schreiner
Can you share the macro?   whenever I see an error involving something "around" 33,000  I immediately look to integer variables.   do you have a line/loop counter? varible perhaps?   something like: Dim rCount or Dim rCount as integer   ??   integers are in the range -32768 to 32768 LONG integers:

Re: $$Excel-Macros$$ Complex cell formulas

2014-05-22 Thread Paul Schreiner
I must be missing something. This looks to be a simple VLookup function.   You have a sheet that has a list of department/GL codes. when you enter the department number, use a VLookup() function to retrieve the GL Account number.   what is the issue? what am I missing?  Paul -

Re: $$Excel-Macros$$ Moving Row Data to the Left Forcing Blank Cells to the Right

2014-05-21 Thread Paul Schreiner
This macro seems to work with the sample data:   Option Explicit Sub Cleanup()     Dim R, nRows     Dim C, nCols, C2     Dim bFlag     nRows = ActiveCell.SpecialCells(xlLastCell).Row     nCols = ActiveCell.SpecialCells(xlLastCell).Column     For R = 2 To nRows     If (Cells(R, "A").Value & "X"

Re: $$Excel-Macros$$ Password protected work sheet

2014-05-19 Thread Paul Schreiner
Yes, there are ways to override (break) passwords. But, per Forum Rules #3, you shouldn't seek them here. --- 3) Don't post questions regarding breaking or bypassing any security measure. ---   xx Th

Re: $$Excel-Macros$$ What is Call Back URL...

2014-05-15 Thread Paul Schreiner
Remember:  Google is your friend.   searching for "Call Back URL" returns 1,530,000 hits.   with explanations and examples!  Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you c

Re: $$Excel-Macros$$ Excel macro from 2003 no longer works in Excel 2010

2014-05-15 Thread Paul Schreiner
For:  Workbooks("ESS CentreVu Stats Half").Worksheets("Mel").Range("b3").Value   Is the workbook "ESS CentreVu Stats Half" open?   I tested code with my workbook. It seems that the file extension must be included.   In my case: Workbooks("Ora_RMS_Flags_Master.xlsb").Sheets("Ora_PN").Range("B3").Va

Re: $$Excel-Macros$$ Need help in Mid function

2014-05-02 Thread Paul Schreiner
Are you looking for a workseet function or VBA solution?   If you need a worksheet function, I used this logic: A1 = "Being amt. of claim incentive for CE of Apr-14 claim receivable from TDL."   in a cell named "AmtofClaim" I used the formula: =FIND("amt. of claim",A1) + 14 (14 is the length of "am

Re: Fwd: $$Excel-Macros$$ Value need to update as per master (excel sheet Attached)

2014-05-01 Thread Paul Schreiner
I'm not sure your explanation is any clearer You said:   "I have one macro by that macro some value get calculate and it will be any number, " So, it could be 41760.2759594907 ? or will it be from the list of target% values? once that number appears in 1 cell then next cell is the "next cell" the

Re: $$Excel-Macros$$ Macro to look for x in Columns and paste data in worksheet in various folders

2014-04-30 Thread Paul Schreiner
Do you know how to write macros and are asking for help? or are you asking for someone to write the macro? Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the peo

Re: $$Excel-Macros$$ Need some help to change data format - urgent

2014-04-29 Thread Paul Schreiner
So... you're asking one or more of us to write the VBA code for you?   are you familiar with VBA? what have you done so far?   Is the "base data" exactly how it comes from your timekeeping system? the "times" are in a mixed format. some are like:  23:04 (hours, minutes) where others are like:  6.35

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

2014-04-29 Thread Paul Schreiner
?? That's what sorting does.   evidently, you have additional requirements that you've not included. Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people yo

Re: $$Excel-Macros$$ Re: find duplicate rows of data between sheets macro

2014-04-28 Thread Paul Schreiner
11:49 AM >Subject: Re: $$Excel-Macros$$ Re: find duplicate rows of data between sheets >macro > > > >Hi Paul, > > >The code given above works well for the sheets in same workbook. >send me the code for data in two different work books. > > >Regards >Euge

Re: $$Excel-Macros$$ Re: find duplicate rows of data between sheets macro

2014-04-25 Thread Paul Schreiner
It works perfectly in my workbook. Row 6 is unhighlighted in sheet1 and 6 and 13 are unhighlighted in sheet2.   better check to make sure the macro was copied correctly, here it is from my workbook:   Option Explicit Public Dict_Data1, Dict_Data2 Sub Compare()     Dim Sht1, Sht2     Dim nRows, r, s

Re: $$Excel-Macros$$ Re: find duplicate rows of data between sheets macro

2014-04-25 Thread Paul Schreiner
Must be something I changed when I went to test my large sample.   I'll take a look at it. Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As

Re: $$Excel-Macros$$ find duplicate rows of data between sheets macro

2014-04-25 Thread Paul Schreiner
I threw this together and tested it. it works on your sample data.   I then tested it on a sample file of 135000 records.   it took about 6 minutes to do 135,000 records.   I tested a variation that puts a "flag" into column J, then, once complete, filters on this column and highlights the rows.  

Re: $$Excel-Macros$$ Time Stamp Limited to Target Cells Within a Specic Range

2014-04-25 Thread Paul Schreiner
Try testing to see if the selected target "intersects" the specified range:   If (Not Intersect(Range(Target.Address), Range("D5:G10")) Is Nothing) Then Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places y

Re: $$Excel-Macros$$ macro to open comma delimited, run actions, save as csv

2014-04-24 Thread Paul Schreiner
What do you mean:  "It won't save".   do you get an error?  (what is it) does it save, but in an incorrect format?     Why the "_" in xlCSV_ ??   normally, the "_" means the code is continued in the next line (but it requires a space before)   I suspect you're getting a file format error...  

Re: $$Excel-Macros$$ Convert JSON to VBA array

2014-04-22 Thread Paul Schreiner
I would probably split the array and do something like:   Sub json_2_Array()     Dim Array1, Array2, sArray     Dim inx1, inx2, i     Dim jSon     jSon = "[[""A"",""string"",0,""NULL""],[""B"",""string"",0,""NULL""],[""C"",""string"",0,""NULL""],[""D"",""string"",0,""NULL""],[""E"",""string"",0,""

Re: $$Excel-Macros$$ inserting missing date in data

2014-04-16 Thread Paul Schreiner
What line is giving you a mismatch error? What are the values of the two cells being compared?     also, you're setting LR = the last row of data in column "A", but then never use the value (so it's unnecessary).   I ran this macro on a sample file that had 132,000 rows and it worked as I expected

Re: $$Excel-Macros$$ Need help to find the missing emp id on particular date

2014-04-15 Thread Paul Schreiner
Need help to find the missing emp id on >particular date > > > >Thank you paul, for exposing us to the scripting.dictionary object. >Can you please share, some more details  and uses of the dictionary Object. > > >Regards >Eugene > > > >On Tue, Apr 8, 20

Re: $$Excel-Macros$$ Random numbers in decimal

2014-04-14 Thread Paul Schreiner
absolutely.   The vba code for random numbers is rnd()   So, you can use something like:   rNum = rnd()   this will give you a single-precision random number between 0 and 1 (like: .5795186) You can then round this to whatever you like. rNum = int((Rnd * 5) + 1  will give you a random integer be

Re: $$Excel-Macros$$ Creating UserForm on Upper, Lower and Proper case

2014-04-10 Thread Paul Schreiner
Form on Upper, Lower and Proper case > > > >Test your attachments. > > >2014-04-10 18:48 GMT+07:00 Paul Schreiner : > >What is it you would like to know? >>the functions required: >>  >> StrConv(Rng.Value, vbProperCase) >> StrConv(R

Re: $$Excel-Macros$$ Creating UserForm on Upper, Lower and Proper case

2014-04-10 Thread Paul Schreiner
What is it you would like to know? the functions required:   StrConv(Rng.Value, vbProperCase) StrConv(Rng.Value, vbUpperCase) StrConv(Rng.Value, vbLowerCase) how to loop through the selected cells? For Each Rng In Selection     Rng.Value = StrConv(Rng.Value, vbProperCase)  

Re: $$Excel-Macros$$ Need help to find the missing emp id on particular date

2014-04-08 Thread Paul Schreiner
I did it two different ways. You IMPLIED that you wanted a macro (hence, the button) So, I used a technique in which I loaded a Dictionary object with all empid's for the date specified, then looked through the list of all empid's and checked for those that did not exist in the Dictionary object.

Re: $$Excel-Macros$$ Link Custom Toolbar with a file

2014-03-07 Thread Paul Schreiner
I have several Excel workbooks that have custom Tool Bars. In Excel 2010, they decided that custom toolbars need to be in "Add-Ins", which, in my opinion, was a poor decision.   What I use is:   I created a macro called New_CmdBar in which I define the toolbar (called "PMTR").   Then, in the ThisW

Re: $$Excel-Macros$$ How to link a cell between two worksheets keeping the Hyperlink?

2014-03-06 Thread Paul Schreiner
I take it you're using a Change "event" to update the th second worksheet?   If that's the case, the reason is because the change event is triggered by the content of the cell, not how it's "displayed".   For example: if you have a date in a cell like:  06-Mar-2014   The cell ACTUALLY contains a n

Re: $$Excel-Macros$$ Re: "Two-dimensional" interpolation

2014-03-06 Thread Paul Schreiner
The problem seemt to be:   in LinInterpolate, xRange and yRange are declared as "variant" when you pass xRange as Range("B3:B44").Value, you're passing an ARRAY, so xRange becomes an Array variable.   an Array variable doesn't HAVE the property of: xRange.Cells.Count because xRange (as an Array) do

Re: $$Excel-Macros$$ Re: Array from range

2014-03-05 Thread Paul Schreiner
I understand.   Actually, I started writing that, thinking that it was going to be the problem. Then, decided to do some testing and observation and determined that it was NOT the cause, but might become a problem in the future, so left it in the email. Paul --

Re: $$Excel-Macros$$ Re: Array from range

2014-03-05 Thread Paul Schreiner
What value do you end up with for TIP ?   You're ReDimensioning BETA as size (TIP) But BETADEG will always be (10) ("H19:H28")   So, if TIP is more than 10, then it might cause a problem.   However, when I changed: Cells(s,34)=BETADEG(s) to: Cells(s,34)=BETADEG(s,1) your "snippet" of code ran corr

Re: $$Excel-Macros$$ Macro Single code require for if condtion

2014-03-04 Thread Paul Schreiner
You could replace your If/ElseIf/Endif statement with a Select Case Statement:   Select Case Selection.Offset(0, 2).Value     Case "GURGAON(DELHI-NCR)", "MANESAR(HR)", "ROHAD(HR)"     Selection.Offset(0, 12).Value = "Gurgoan-Rohad-Pathredi"     Case "HSR-CRD(HR)", "HSR-GET HOSTEL", "HSR-HRD(HR)

Re: $$Excel-Macros$$ Run macro when file is opened by another excel file?

2014-02-28 Thread Paul Schreiner
Where did you place the Private Sub Workbook_Open macro?   (It belongs in the Thisworkbook module) also, instead of having the user enter the version number, why not have the macro READ the number? (that is, unless the name of the original file (File A) changes) also: what I have done is crea

Re: $$Excel-Macros$$ Long if-then function? HELP

2014-02-26 Thread Paul Schreiner
Could you send me the entire function? (you could send it directly)   Is there a relationship between the variables that influences the rate?   I think I'd like to look at nested Select statements.     Paul - “Do all the good you can, By all the means you ca

Re: $$Excel-Macros$$ Alternate for concatenate in excel

2014-02-26 Thread Paul Schreiner
February 25, 2014 11:13 AM >Subject: Re: $$Excel-Macros$$ Alternate for concatenate in excel > > > >Hi, > >Any alternate of it. we have nearly 500 rows like this to divide it. > > > > > > >On Tue, Feb 25, 2014 at 8:33 PM, Paul Schreiner wrote: > >

Re: $$Excel-Macros$$ Alternate for concatenate in excel

2014-02-25 Thread Paul Schreiner
t;select >column1,coumn2 from table1 t,table2 t2 where >t1.condition1=t2.condition1,t2.condition2=t2.condition2 and date"& >(TEXT(TODAY()-1,"MMDD")&"(subquery)") > > >it throws the error message as "Text values in formulas are limited to 255

Re: $$Excel-Macros$$ VBA for-loop: for I = (current cell) to (count active cells below)

2014-02-25 Thread Paul Schreiner
There are LOTS of ways to determine the number of "active" rows of data. Which will work best will depend on the nature of your data.   For instance: your data has a column header in row 1 and each row has a value in column "A".   There are some VBA statements that utilize Excel worksheet functions

Re: $$Excel-Macros$$ Alternate for concatenate in excel

2014-02-25 Thread Paul Schreiner
I'm not sure what you mean by:   "excel cell has sql query"   Are you using VBA to run a SQL query and placing the result in the cell? or are you using an "External" source that populates the Excel sheet? and.. what is it you're trying to do? Paul - “Do al

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

2014-02-25 Thread Paul Schreiner
Gerrit,   Many of us have here have similar (and varied) backgrounds. Personally, mine was in Fortran IV, Cobol, C, C++ and UNIX scripting. I'm currently maintaining close to 100,000 lines of VBA code in multiple applications.   I think one of the biggest benefits of VBA is in the editor/debugger.

Re: $$Excel-Macros$$ batch file Query

2014-01-15 Thread Paul Schreiner
First of all, I think the problem is that you don't know what the "Current" directory is for your Excel instance.   When you execute the .bat file manually, You're probably using the keystrokes: C:\ cd \Users\User\Desktop\mails\Rename\ Extract The portion of the command "> myfiles.txt" redirects t

Re: $$Excel-Macros$$ Run time error '1004' Method "Range " of oblect '_Globle fails

2014-01-02 Thread Paul Schreiner
I'm not sure what the purpose of your macro is.   It LOOKS like ComboBox1 has: "CAP, CREAM, DROP". You're trying to select from one of these values in the combobox and load another list (pre_Med_Name_1)   But there's a couple of things wrong with this approach. First, the Range() object only has a

Re: $$Excel-Macros$$ Please help on FileName = Dir()

2013-12-05 Thread Paul Schreiner
In your script, you have a line: FileName = Dir(CurrDir & "*.*", vbDirectory) This basically creates a "collection" of information from "CurrDir". vbDirectory indicates that it is to return "directories or folders in addition to files with no attributes".   the statement itself returns the first e

Re: $$Excel-Macros$$ need help with nested IF AND formula

2013-12-04 Thread Paul Schreiner
try: =IF(C4>121,IF(C8<50,10,20),    IF(C8<50,(1*C4*60)/(0.75*1000), (2*C4*60)/(0.75*1000)    )    ) Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can,

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

2013-09-11 Thread Paul Schreiner
Could you send me (directly) a sample data file? even just a couple thousand lines would be sufficient. (otherwise, I have to spend time creating sample data!)   I routinely read in comma delimited files. (The largest is 127,000 lines)   I think there are several things I could do with your macro t

Re: $$Excel-Macros$$ Calculate expirationDate based on CreationDate and Number

2013-08-29 Thread Paul Schreiner
Yes Keep in mind that the DATE is simply a number, displayed in Date format.   So, your date: 1/1/2013 is really 41275 (the number of days since 1/1/1900)   So, your "Expiration Date" is 41275 + 30, or 41305 which is DISPLAYED as 1/31/2013   a Macro would would similarly: Sub ExpDate()     Dim

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

2013-08-29 Thread Paul Schreiner
Are the "times" actual EXCEL TIME or a string?   If it's ACTUAL Excel time, then the values are actually numbers. That is, the fractional part of a day.   6:00am is .25 6:00pm is .75   So, to determine how many values are between 7:00am and 7:59am, you're actually wanting to count the number of val

Re: $$Excel-Macros$$ Un protect the excel file

2013-07-23 Thread Paul Schreiner
xcel-macros@googlegroups.com >Sent: Tuesday, July 23, 2013 7:50 AM >Subject: Re: $$Excel-Macros$$ Un protect the excel file > > > >Dear Paul Sir, > > >Thanks for the information . I will search it by Google. Henceforth same will >not happen again. > > >Rega

Re: $$Excel-Macros$$ Un protect the excel file

2013-07-23 Thread Paul Schreiner
See Forum Rules #3: "Don't post questions regarding breaking or bypassing any security measure."   The problem is, there is no way for any of us to know if YOU actually own the file and are really the one that forgot the password.  Not that we're accusing you of lying, but how do we know?   Let's

Re: $$Excel-Macros$$

2013-07-23 Thread Paul Schreiner
"these type of cases"? I'm not sure your situation falls into a "type" of case.   In YOUR case, Excel is interpreting your string "> 7 days" as:  GREATER than " 7 days" or:  GREATER THAN [space]7[space]"days"   In your samples, your cells contain "0-3 Days", "4-7 Days" or "> 7 Days". In each case,

Re: $$Excel-Macros$$ Re: Whole Sheet is Hidden, But actually not Hidden!

2013-07-19 Thread Paul Schreiner
Hmm... I have to disagree. I have an excel workbook that has 75 columns and 127,000 rows (and growing). THEN, the workbook has 20 sheets that report this data in different formats, and are used for queries against the data.   I consider THIS "a lot of data".   however, compared to the 5 million re

Re: $$Excel-Macros$$ To SUM Dynamic Columns

2013-07-19 Thread Paul Schreiner
; >I will try the formula with suggested changes and will get back to you with >the feedback. > > >Thanks for your time and help. > > > > > >On Fri, Jul 19, 2013 at 3:20 PM, Paul Schreiner wrote: > >In your first message, you didn't mention that the value in co

Re: $$Excel-Macros$$ To SUM Dynamic Columns

2013-07-19 Thread Paul Schreiner
In your first message, you didn't mention that the value in column A may not match the values in the row!   The solution I provide could be used. simply use the MATCH() function to return the row number of the matching value from column A and use that instead of the ROW() functions I used. Paul

Re: $$Excel-Macros$$ To SUM Dynamic Columns

2013-07-19 Thread Paul Schreiner
Here's my answer: =SUM(INDIRECT(ADDRESS(ROW(),8) & ":" & ADDRESS(ROW(),MATCH($D$1,$H$1:$Z$1)+7)))   Here's my logic: You want to use the =SUM() function to calculate the total for the current row from column H1 through the column described in D1.   For Jun-12, the SUM() function would look like: =S

Re: $$Excel-Macros$$ Whole Sheet is Hidden, But actually not Hidden!

2013-07-19 Thread Paul Schreiner
I've encountered similar issues before. It seems to be a graphical memory issue. Usually, I have several applications open at once. At some point, the memory on the graphics card is exhausted. Even when you exit the other applications, sometimes the graphics memory isn't released.   My PC was upgr

Re: $$Excel-Macros$$ Preserving OLD values

2013-06-14 Thread Paul Schreiner
The way I've accomplished something similar is:   Create a Public Variable Create a SelectionChange event   The Event macro checks to see if the selected cell is in column "A".  If it is, save the current content in the Public Variable. Create a CHANGE event   In the Change Event, if the cell cha

Re: $$Excel-Macros$$ Conditional Search & Replace

2013-06-06 Thread Paul Schreiner
Replace Dear Sir, Small Question... then Sir  what is exact meaning and use of declare variable in below case? Thanks in Advance . Reg, Prafull Jadhav. On Thu, Jun 6, 2013 at 5:41 PM, Paul Schreiner wrote: IF you do not utilized "Option Explicit" at the beginning of each module,

Re: $$Excel-Macros$$ Conditional Search & Replace

2013-06-06 Thread Paul Schreiner
IF you do not utilized "Option Explicit" at the beginning of each module, then VBA will "automatically" declare a variable the first time it is used. So, yes, the macro should run. However, In my opinion, it is NEVER a good idea to create a variable that is the same "name" as one of the keywords

Re: $$Excel-Macros$$ Abridged summary of excel-macros@googlegroups.com - 32 Messages in 12 Topics

2013-06-05 Thread Paul Schreiner
> >Hi Team, >  >Need your help in creating the macro doing the below:- >  >I am having huge data in different worksheets >I am having 10 worksheets in total >I want to get the data copied from each ...more > >Paul Schreiner Jun 04 09:44AM -0700   > >What expe

Re: $$Excel-Macros$$ Macro - To Combine data from multiple worksheets into one single worksheet

2013-06-04 Thread Paul Schreiner
What experience do you have with VBA and macros? If you record a macro in which you use Ctrl-End to locate the last used cell, you can then use the row number from that selection to determine the range of rows to select. then use something similar to select the last row in the Combined sheet and

Re: $$Excel-Macros$$ Hey I want to know how to create variable macros for creating the attendence sheet plese help me out

2013-06-04 Thread Paul Schreiner
The Body of your email ended up in the subject line. >From the subject line, I gather you have an attendance sheet. But the term "variable macros" is confusing. You want macros that vary? Or you want macros to do SOMETHING and somehow you want the macros to make use of variables? Could you plea

Re: $$Excel-Macros$$ Re: how to crack Excel VBA password

2013-05-31 Thread Paul Schreiner
Please keep in mind that the FORUM RULES state: 3) Don't post questions regarding breaking or bypassing any security measure. Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times yo

Re: $$Excel-Macros$$ Error show while excel file opening

2013-05-31 Thread Paul Schreiner
It's not VBA related. Somewhere in the file is a formula that refers to data in another file, and the other file does not exist. If you choose "Edit Links", it will show you what file is not available. If you then "break" the link and save your file, the reference will no longer cause a problem.

<    2   3   4   5   6   7   8   9   10   11   >