$$Excel-Macros$$ Back up database from web to excel

2010-06-25 Thread Hemant Hegde
Hi friends

I have made a chat site using php and mysql.

it is http://mylogo.0fees.net .

Is there a way to automatically back up the database to an excel workbook
using VBA macros?

I mean is there a way to make a POST data request without user interface?

Any help is verymuch appreciated :)

Hemant Hegde

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
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 excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 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


Re: $$Excel-Macros$$ Creating new sheet for each person and transferring their data

2010-06-08 Thread Hemant Hegde
Hi Amanda

You haven't specified at what stage you are stuck with your macro or
attached the workbook.

The correct way to go would be
1) Confirm if names are repeated in the source sheet
2) Loop through the column containing the names.
3) Go on adding and renaming sheets and pasting the specific row from the
source sheet to an empty row next to the used range!
.
.
.
... pls attach your workbook!!

:)
Hemant Hegde


On 7 June 2010 09:59, Amanda  wrote:

> Hi all,
>
> I'm stuck on a macro I'm working on. I'm uploading an example sheet.
>
> I have a list of data - the first column has the person's name - each
> person can have any number of rows.
>
> I need the macro to create a new tab with the name of the person
> (which is the entry in the 'A' column) and and to copy over all of the
> rows for that person. In the end I want the first page with all the
> data, and then a tab for each person with their data in it. It would
> be safest to copy the entire row - the number of columns with data may
> change.
>
> Thanks,
> Amanda
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 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 excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 7000 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
>

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
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 excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 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


Re: $$Excel-Macros$$ Re: Creating new sheet for each person and transferring their data

2010-06-08 Thread Hemant Hegde
Hi

You may also

1) sort the column (say A)
2) write this formula in an empty (or insert a new one) column next to A (B)

=A2=A1

3) Filter column B for all "TRUE" values and delete entire rows of the
filtered range!

:)
Hemant Hegde


On 8 June 2010 19:34, ashish koul  wrote:

> first sort  the sheet on col a basis then run  it 
>
>
>
> Sub Macro1()
> Dim i, j, s, r  As Long
> Dim a As String
>
> j = 1
> Sheets(1).Select
> Range("A10").Select
> Selection.End(xlUp).Select
> r = ActiveCell.Row
>
> For i = 1 To r
>
> If Range("a" & i + 1) <> Range("a" & i) Then
> a = Range("a" & i).Value
>
> s = i
>
>
> Rows(j & ":" & s).Select
> Selection.Copy
> Sheets.Add After:=Sheets(Sheets.Count)
> ActiveSheet.Paste
>
> ActiveSheet.Name = a
>
>
>
>  j = i + 1
>  Sheets(1).Select
>  End If
>
>   Next i
>  Sheets(1).Select
>
>
> End Sub
>
>
>
> On Tue, Jun 8, 2010 at 1:22 PM, L.K. Modi  wrote:
>
>> thank you i understand
>>
>>
>> On Tue, Jun 8, 2010 at 4:43 AM, Amanda  wrote:
>>
>>> Hi Lkmodi,
>>>
>>> The uploaded spreadsheet does not have any formulas/VBA in it. It is
>>> simply to give you an idea of what the sheet will look like (first
>>> tab) and what I want the tabs to eventually look like (2nd tab).
>>>
>>> Thanks,
>>> Amanda
>>>
>>> On Jun 7, 6:15 pm, "L.K. Modi"  wrote:
>>> > > DEAR AMANDA
>>> >
>>> > > I HAVE FOUND THE SAMPLEWORKSHEET BUT UNABLE TO FINE THE LOGIC BECAUSE
>>> > > THERE  IS NO FORMULA IS THERE. PLS EXPLAIN IN DETAILS THAT WORKSHEET
>>> SO THAT
>>> > > WE CAN KNOW THE LOGIC. I WANT TO KNOW HOW U SEGREGATED THAT TWO NAMES
>>> FROM
>>> > > THE DATA WORKSHEET
>>> >
>>> > > REGARDS
>>> > > LKMODI
>>> >
>>> > > On Mon, Jun 7, 2010 at 10:57 AM, Amanda 
>>> wrote:
>>> >
>>> > >> Or you can download the sample spreadsheet here:
>>> >
>>> > >>http://dl.dropbox.com/u/7375694/Amanda%20Example.xlsx
>>> >
>>> > >> --
>>> >
>>> > >>
>>> ---
>>> ---
>>> > >> Some important links for excel users:
>>> > >> 1. Follow us on TWITTER for tips tricks and links :
>>> > >>http://twitter.com/exceldailytip
>>> > >> 2. Join our LinkedIN group @
>>> http://www.linkedin.com/groups?gid=1871310
>>> > >> 3. Excel tutorials athttp://www.excel-macros.blogspot.com
>>> > >> 4. Learn VBA Macros athttp://www.quickvba.blogspot.com
>>> > >> 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com
>>> >
>>> > >> To post to this group, send email to excel-macros@googlegroups.com
>>> >
>>> > >> <><><><><><><><><><><><><><><><><><><><><><>
>>> > >> HELP US GROW !!
>>> >
>>> > >> We reach over 7000 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
>>>
>>> --
>>>
>>> --
>>> Some important links for excel users:
>>> 1. Follow us on TWITTER for tips tricks and links :
>>> http://twitter.com/exceldailytip
>>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>>> 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 excel-macros@googlegroups.com
>>>
>>> <><><><><><><><><><><><><><><><><><><><><><>
>>> HELP US GROW !!
>>>
>>> We reach over 7000 subscribers worldwide and receive many 

Re: $$Excel-Macros$$ need help in excel

2009-12-02 Thread Hemant Hegde
Hi Shilpa

If you tried to copy/move all the sheets to another workbook and it didn't
work, it might be because either of the workbook is protected.

Go to Tools>>Protection>>Unprotect Workbook and try to copy again.

Another reason I can think of could be that either of the workbooks is
opened in a separate instance of Excel! In this case when you try to copy
sheets, you wont see the name of the destination workbook in the menu!

In that case use CTRL+O rather that doubleclicking on the file icon to open
those workbooks..

:)

Good luck
Hemant Hegde


2009/12/2 Amitabh Bose 

>
> Hi Shilpa,
>
> Just to add to Mahesh's email .. this will work if you open both Excel
> workbooks in the same Excel 'window'.
>
> Thanks,
>
> Amitabh
>
> --
> Date: Wed, 2 Dec 2009 17:00:52 +0530
> Subject: Re: $$Excel-Macros$$ need help in excel
> From: mahender.bi...@gmail.com
> To: excel-macros@googlegroups.com
>
>
> Hi Shilpa,
>
> Open both the files(Ex:- A & B) and the select all the sheet u want move
> from B to A.
> Then right click on the tab and select move, w will see a new pop- up
> select Sheet A and press ok.
>
>
>
> On Wed, Dec 2, 2009 at 1:50 PM, Shilpa Rao  wrote:
>
> Hi Friends,
>
> I have 2 excel file having 12 sheets in it, what I want is to merge two
> file into one. I tried using move or copy but it din't work. Is there any
> method. Please not that i have formula in both file
>
> --
> Regards,
> Shilpa
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
>
>
>
>
> --
> With Love,
> Mahesh Bisht
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
> --
> View your other email accounts from your Hotmail inbox. Add them 
> now.<http://clk.atdmt.com/UKM/go/186394592/direct/01/>
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><>

$$Excel-Macros$$ Urgent Help Needed!!!!!

2009-11-30 Thread Hemant Hegde
I had almost completed my VBA project and then decided to convert it to
stand alone exe file using VB6 so that I can register my custom type data
files to have a specific Icon and enable them to be opened with my
application on doubleclick.

I have converted most of it successfully but just now I am seeing that
Comboboxes and Listboxes here are totally different than in VBA.

I was using a *hidden* column in almost all comboboxes and listboxes but
having multiple columns in VB6 is *not possible*

However I can *fake* a multicolumn listbox by using TAB (vbtab) but the
problem is that the hidden column must contain a value of data type Integer
which I have to access many times within code.

Is there any *other* way to include a hidden value for each list item of a
combobox or a listbox in *VB6*?


Hemant Hegde

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

$$Excel-Macros$$ ADO

2009-11-28 Thread Hemant Hegde
Hi

Please tell me the difference between ADODC and ADODB

and how to move to next record using ADODC. I didnt see any method like
Adodc1.MoveNext



Hemant Hegde

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Date format problem

2009-11-27 Thread Hemant Hegde
If it has already been converted into date format and you want to reverse
it, use


=Text(date,"yy-mm-dd") or
=Text(date,"dd-mm-yy") the way you want

and then remove formulae by pasting only the values


Hemant Hegde


2009/11/27 Norman May 

> Jitesh
>
> Try formatting the cells as TEXT
>
> Norman
>
>
> On Fri, Nov 27, 2009 at 5:40 AM, Jitheesh Vazhapully <7jit...@gmail.com>wrote:
>
>> Good Evening Excel Gurus,
>>
>> I have a data in this format 01-01-01, however as soon as I enter them in
>> the excel sheet,excel picks it up as date and stores it in date format, Is
>> there any way I can prevent this from happening.
>> Also how to convert this data back from date format 01/01/2001 to original
>> 01-01-01 format
>>
>> Thanks
>>
>> Regards
>>
>> Jitesh
>>
>> --
>>
>> --
>> Some important links for excel users:
>> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
>> http://www.excelitems.com
>> 2. Excel tutorials at http://www.excel-macros.blogspot.com
>> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
>> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>> If you find any spam message in the group, please send an email to:
>> Ayush Jain @ jainayus...@gmail.com or
>> Ashish Jain @ 26may.1...@gmail.com
>> <><><><><><><><><><><><><><><><><><><><><><>
>> HELP US GROW !!
>>
>> We reach over 6,500 subscribers worldwide and receive many nice notes
>> about the learning and support from the group. Our goal is to have 10,000
>> subscribers by the end of 2009. Let friends and co-workers know they can
>> subscribe to group at
>> http://groups.google.com/group/excel-macros/subscribe
>
>
>  --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
>

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ A Non-Excel Query

2009-11-25 Thread Hemant Hegde
Is it windows?

If you want to use VBA for that, filecopy() function should help


Hemant Hegde


2009/11/25 Peetu 

> There are free utilities available such as Allways Sync which can
> synchronize your data between two locations.
>
> On Nov 25, 3:52 pm, Aindril De  wrote:
> > Hi Abhishek,
> >
> > Use the following command:
> >
> > XCOPY "E:\My Collection" "D:\My Collection" /E /S
> >
> > Let me know if you need any further help.
> >
> > Regards,
> > Andy
> > On Wed, Nov 25, 2009 at 2:19 PM, Abhishek Jain  >wrote:
> >
> > > Hi Guys,
> >
> > > I am not sure whether I should ask it here or not because as the
> subject
> > > suggests, this is a non-excel query.
> >
> > > What is the scenario -
> >
> > > I have two locations:
> >
> > > 1. D:\My Collection
> > > 2. E:\My Collection
> >
> > > Under both these folders I have like 500 subfolders. *All the
> subfolders
> > > are named exactly same in both these locations.*
> >
> > > What I want to achieve -
> >
> > > I want to copy (or move) the contents of subfolders from location no. 2
> to
> > > location no. 1.
> >
> > > Example -
> >
> > > Copy *.* from E:\My Collection\Folder 1 to D:\My
> Collection\Folder
> > > 1
> > > Copy *.* from E:\My Collection\Folder 2 to D:\My
> Collection\Folder
> > > 2
> > > Copy *.* from E:\My Collection\Folder 3 to D:\My
> Collection\Folder
> > > 3
> > > and so on.
> >
> > > You all would appreciate that manually doing this with around 500
> folders
> > > would be a headache. Is there any batch program or software or
> something
> > > which can help me in this ?
> >
> > > Any sort of help is greatly appreciated. Thanks in advance.
> >
> > > Best regards,
> >
> > > Abhishek Jain
> >
> > > --
> >
> > >
> --
> > > Some important links for excel users:
> > > 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> > >http://www.excelitems.com
> > > 2. Excel tutorials athttp://www.excel-macros.blogspot.com
> > > 3. Learn VBA Macros athttp://www.vbamacros.blogspot.com
> > > 4. Excel Tips and Tricks athttp://exceldailytip.blogspot.com
> >
> > > To post to this group, send email to excel-macros@googlegroups.com
> > > If you find any spam message in the group, please send an email to:
> > > Ayush Jain @ jainayus...@gmail.com or
> > > Ashish Jain @ 26may.1...@gmail.com
> > > <><><><><><><><><><><><><><><><><><><><><><>
> > > HELP US GROW !!
> >
> > > We reach over 6,500 subscribers worldwide and receive many nice notes
> about
> > > the learning and support from the group. Our goal is to have 10,000
> > > subscribers by the end of 2009. Let friends and co-workers know they
> can
> > > subscribe to group at
> > >http://groups.google.com/group/excel-macros/subscribe
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain  @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
>

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Re: Replace contents in a formula used for whole sheet.

2009-11-25 Thread Hemant Hegde
Hi Nikhil


If you are using find and replace option, make sure that the word you want
to "find" does not contain any part of any of the sheet names. In case it
contains (if it is damaging the formulae), change the sheet names before
"replacing" the formulae.

You can restore the sheet names afterwards


Hemant Hegde


2009/11/25 RolfJ 

> You should provide a bit more detail. What's the formula? Which
> characters do you need to change?
>
> On Nov 24, 2:51 am, nikhil deshpande  wrote:
> > Dear all,
> >
> > I need to change characters used to show results in (IF ELSE ) formula.
> >
> > I tried ctrl F- replace. but it is disturbing mu sheet and askin g to
> save
> > some where else.
> >
> > Kindly guide.
> > --
> > Nikhil
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain  @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
>

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Re: Please solve my prob.with validation.

2009-11-24 Thread Hemant Hegde
logspot.com
>> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>> If you find any spam message in the group, please send an email to:
>> Ayush Jain  @ jainayus...@gmail.com or
>> Ashish Jain @ 26may.1...@gmail.com
>> <><><><><><><><><><><><><><><><><><><><><><>
>> HELP US GROW !!
>>
>> We reach over 6,500 subscribers worldwide and receive many nice notes
>> about the learning and support from the group. Our goal is to have 10,000
>> subscribers by the end of 2009. Let friends and co-workers know they can
>> subscribe to group at
>> http://groups.google.com/group/excel-macros/subscribe
>
>
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
>



-- 
Hemant Hegde

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Share your Coolest VBA codes!

2009-11-24 Thread Hemant Hegde
Here is another code I wrote but could not make much use of it

In the attached excel file, I have a frame inside a sheet which I wanted to
be able to move by drag and drop...

It is working fine.

See if you can use that in you application

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Move.xls
Description: MS-Excel spreadsheet


Re: $$Excel-Macros$$ Share your Coolest VBA codes!

2009-11-24 Thread Hemant Hegde
Hi everyone
Sorry for the delay:

'This is a function which I wrote for displaying and adjusting the form size
for my project:


Public Sub mZoom(ByRef Form As Object, Optional Hzoom As Integer, Optional
Vzoom As Integer)
If Vzoom = 0 Or Hzoom = 0 Then
Hzoom = Application.Width / Form.Width * 100
Vzoom = Application.Height / Form.Height * 100
End If

Dim MinZoom
If Hzoom > Vzoom Then
MinZoom = Vzoom
Else
MinZoom = Hzoom
End If

For Each c In Form.Controls
If Hzoom > 100 Then
c.Width = c.Width * Hzoom / 100
c.Left = c.Left * Hzoom / 100
Else
c.Width = c.Width * Hzoom / (200 - Hzoom)
c.Left = c.Left * Hzoom / (200 - Hzoom)
End If
If Hzoom > 100 Then
c.Height = c.Height * Vzoom / 100
c.Top = c.Top * Vzoom / 100
Else
c.Height = c.Height * Vzoom / (200 - Vzoom)
c.Top = c.Top * Vzoom / (200 - Vzoom)
End If
On Error Resume Next
c.Font.Size = CInt(c.Font.Size * MinZoom / 100)
Next c
If Hzoom > 100 Then: Form.ScrollWidth = Form.Width * Hzoom / 100
If Vzoom > 100 Then: Form.ScrollHeight = Form.Height * Vzoom / 100
Form.Width = Form.Width * Hzoom / 100
Form.Height = Form.Height * Vzoom / 100
Form.Show
End Sub

If you have missed to read the original post, I had told that I will post
some code for

1) adjusting the form size according to the screen size

2) distributing the controls and adjusting their font size and

3) determining and adjusting the scroll height/width of the form

If you ommit to specify the optional variables, it will maximise the excel
window and use the dimensions of its parent aplication. Otherwise, you may
also specify the percentage of how much you want to strech/shrink the
userform.

eg: call mzoom(userform1, 120,120)

or just

call mzoom(userform1)



Thanking you :)


Hemant Hegde

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

$$Excel-Macros$$ Share your Coolest VBA codes!

2009-11-22 Thread Hemant Hegde
Why not we share some of our own useful codes or techniques (which can not
be easily found by a google search) which will save lot of effort and time?
:)
I am going to post some of the vb codes I wrote or got on the net.

I will post a function (tomorrow because I don't have it here!) I wrote
which will adjust the size of a userform to the screen size and also will
distribute all the controls in it without overlapping on each other.

Please post yours

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Re: Store Cell formatting

2009-11-14 Thread Hemant Hegde
Hi Paul

Thanks for the reply. I am using excel 2003.

I learnt about xll files only through google search. I dont have any Idea
how to make an xll file or how to use an existing one.

Do you know how to evaluate this?

x = " = Y(1,1).Value1"

where value1 is a property of a variable defined in a class module. Notice
that the argument is stored as a string.

The Evaluate() function doesn't work as it is for the workbook object and
not for VBA

Actual code I am using is below:

Inside the class module named "MySpreadSheet"

Option Explicit
Private pFormula1 As String
Private pValue1 As Variant
Property Let Formula1(Text)
pFormula1 = Text
End Property
Property Get Formula1()
Formula1 = pFormula1
End Property
Property Let Value1(Value As Variant)
pValue1 = Value
End Property
Property Get Value1()
Value1 = pValue1
End Property
Sub Calculate()
On Error GoTo Err:
'This is where I dont know what to do!
pValue1 = Evaluate(pFormula1)
Exit Sub
Err:
pValue1 = "#ERROR! " & Err.Description
End Sub



This is the code inside a normal module:
Option Explicit
Public X() As New MySpreadSheet
Public Y() As New MySpreadSheet
Sub Test()
Dim mRow, mColumn As Integer
ReDim Preserve X(1 To 10, 1 To 10)
ReDim Preserve Y(1 To 10, 1 To 10)
X(1, 1).Formula1 = "=Y(1,1).Value1"
Y(1, 1).Value1 = "Hello Wrold"
For mRow = 1 To UBound(X, 1)
For mColumn = 1 To UBound(X, 2)
X(mRow, mColumn).Calculate
Next mColumn
Next mRow
MsgBox CStr(X(1, 1).Value1)
End Sub


Result I want is "Hello World"

But I am getting "ERROR 2015"


Please run this code and suggst me if there is any way to evaluate a string
argument

With regards

Hemant Hegde

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ unable to set the visible property of the worksheet class

2009-11-13 Thread Hemant Hegde
Hi

Its because you have protected the workbook.

Unprotect it

Press Alt+t p w and then provide the password and then try :)

Hemant Hegde


2009/11/12 mahesh parab 

> Dear All
>
> In attach sheet when i try to unhide sheet i am getting caption error.
> steps are mention on below mention link
>
> http://www.ehow.com/how_2132122_worksheet-another-user-cant-unhide.html
>
> In visual basic screen when i click on the sheet & try to make visible in
> properties window. i am getting caption error.Anyone knw how to unhide
> worksheet through visual basic
>
>
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Problem with Hyperlink

2009-11-13 Thread Hemant Hegde
Hi

I don't know the exact reason for this problem. But I can suggest you to use
HYPERLINK() Formula.

Using this, you can make the hyperlinks dynamic, more stable (as u say it
isn't right now) and intelligent!

It can be little difficult but its is not a rocket science. You can google
it or attach an example workbook here so that I can tell you how to start
with it if you are interested.


With Regards
Hemant Hegde


2009/11/13 DEBASHIS BANERJEE 

>
>
> -- Forwarded message --
> From: DEBASHIS BANERJEE 
> Date: Nov 12, 2009 1:34 PM
> Subject: $$Excel-Macros$$ Problem with Hyperlink
> To: excel-macros@googlegroups.com
>
> Dear Friends ,
>
> I have workbook having multiple sheet. Each Page is connected with
> Hyperlink . Problem is that as soon as the file is closed , Hyperlinks
> disappear.  It is continuing for several time that I have  edited the
> hyperlink  and it is disappearing .
>
>
>
>
> Kindly help  how to solve this problem.
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
>
> --
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
>

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Re: Store Cell formatting

2009-11-12 Thread Hemant Hegde
Hi Paul

Thank you for the suggestion. Whenever I have to format a sheet which
requires complex formatting, I will always keep a hidden sheet which is
already formatted.

I will copy the default formatting (and also formulae) from the hidden sheet
and paste it on the target sheet using "ActiveSheet.paste" and it is very
quick.

But in spite of that, the macro has to do a number of iterations (something
like 2000*300) and it is very slow!

Hidden sheet templates are already inter-linked to each other and contain a
complex array of formulae (I have used them to decide which rows are to be
deleted and which to be retained)


We can easily guess why excel takes so much time when we are
deleting/inserting rows. It has to update all the formulae in the workbook
as the CELL ADDRESS CHANGES when we delete/insert a row (it does that even
when calculation is set to XlManual and AS and WHEN we delete a row)

I don't think simulation of a spreadsheet using code to accomplish this is
feasible solution as im sure its going to be too complex.

The only way to do this could be to use *.XLL files as these are already
compiled and as fast as excel's built in functions.

Where on the net can I get examples (open code of course) of working *.XLL
files?

If you know it yourself and want to help me, It will be very very nice and I
will be grateful to you for the help..

thanking you
Hemant Hegde


2009/11/12 Paul Schreiner 

> I'm not sure of any other ways, but one piece of advice:
>
> Determine what the "default" formatting is for the sheet.
> Save the "default" once.
> then, check the cells against the default.
> Only save those that DIFFER from the default
> (or perhaps only the features that are different)
>
> that way, when you restore the document,
> you first set the defaults for the sheet, then only process the
> differences.
>
> Paul
>
>  --
> *From:* Hemant Hegde 
>
> *To:* excel-macros@googlegroups.com
> *Sent:* Wed, November 11, 2009 10:55:41 AM
> *Subject:* $$Excel-Macros$$ Re: Store Cell formatting
>
> Hi
>
> Thank you Paul and RolfJ
>
> The file I want to save in binary format already contains 4 ararys of
> variable size (these are to store: the file version info, settings and user
> preferences, main data, and other data)
>
> The excel formatting I and values I am trying to save is just a part of the
> above said file. I dont want to create two files (one myformat.svi and
> another, excel.xls) but to include it in the same file.
>
> Furthermore I want the file to be as small as possible because the data to
> be save can be accounting transactions data which can run into any length...
>
> If I am able to convert different combinations (there wont be many) of cell
> formatting into a number (preferably between 0 - 255 so that i can store
> that as a Byte) It would make my file smaller than excel's own format.
>
> What I mean by different combinations is:
>
> a Byte with value 0 may mean [ Font color=*Black*, Backgroung color=white,
> Bold=*False*, Font ="Arial"] and
>
> a Byte with value 1 may mean [ Font color=*Red*, Backgroung color=white,
> Bold=*True* Font ="Arial"] and
>
> and so on untill its 255 and I think more combinations wont be required.
>
>
> Another important reason to do that is to avoid recalculation when the user
> makes only a small change which affects only few values (or formatting) in
> the final report..
>
> I dont know if applying the cell formatting to each cell one after another
> takes same [or more :( ! ] amount of time as a total recalculation!!
>
> It will be nice if you advice me if I can do it in some other way. I heard
> "*.DLL" and *.XLL" files are faster? will these help?
>
> Thank You
> Hemant Hegde
>
>
> On 10/11/2009, RolfJ  wrote:
>>
>>
>> Please explain why you don't save the worksheet resulting from your
>> calculations in the intrinsic Excel format (i.e. as an Excel
>> workbook).
>>
>> On Nov 8, 12:20 pm, Hemant Hegde  wrote:
>> > Hi
>> >
>> > After a lot of coding and lengthy calculations (takes up to 2 minutes) I
>> get
>> > a sheet (actually a report) with lot of numbers and different cell
>> > formatting.
>> >
>> > Now I need to store the cell values together with cell formatting in a
>> > binary file to avoid repeated lengthy calculations.
>> >
>> > The only option I able to think is to store all the formatting values
>> one
>> > after another in the binary file eg. For cell's background colour, I
>> will
>> > have to store

Re: $$Excel-Macros$$ procdure to limit the printing to fix number of times

2009-11-12 Thread Hemant Hegde
Hi

You can keep a count of number of prints taken using VB but I don't think
you can actually restrict it because the user can print it

1) on another machine
2) Or by just changing the name of the workbook
3) Or by restoring the original copy of the workbook after the number of
prints allowed are exhausted.

If you can explain the reason and importance of doing it, we may be able to
give you a suitable solution


Hemant Hegde


2009/11/10 OSAVentures Calamba 

> dear gurus,
>
> say i have a worksheet, but i want to limit the printing of this worksheet
> to 10 times only.  is it possible?
> any vba idea.  most probably this is a worksheet print event?
>
> im new to macro.  thanks for understanding.
>
> dellosa
>
> --~--~-~--~~~---~--~~
> --
>
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain  @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
> -~--~~~~--~~--~--~---
>
>

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Re: $$Excel-Macros$$ Re: Declare constant inside a type block

2009-11-11 Thread Hemant Hegde
Hi Paul

I managed it without a constant inside type block but I wanted to dceclare
one because

I use many subs where I use (and plan to use) custom type variables to write
to and read from binary files (eg: save, open, import from old file, convert
file to higher version etc) and I dont want to remember what value I
assigned for each "mDataType" property of different custom types.

I could do that with class modules BUT before I learnt to write data in
binary format, I only knew to write data in "random access" format and it
was not possible to write a "Class" to a random access file as a single
record (ie. without writing each property of the variable separately which I
cant avoid while writing a binary file!)

The problem is that I dont want to change much of code I already wrote!


With regards

Hemant Hegde




On 09/11/2009, Paul  wrote:
>
>
> I may be a little slow... but why does it need to be a constant within
> the "Type"?
>
> If what you're saying is that MySviData.mDataType is always 1, then
> why do you need to declare it?
>
> sorry,
>
> can't see a way...
>
> Paul
>
> On Nov 6, 1:46 pm, Hemant Hegde  wrote:
> > Is there a way to declare a constant strin inside a type block?
> >
> > I have this code
> >
> > Type MySviData
> > Const mDataType As Byte = 1
> > SettingName As String * 16
> > SettingValue As String
> > End Type
> >
> > Now this gives an error >
> >
> > "Compile Error:
> > Statement Invalid inside Type Block"
> --~--~-~--~~~---~--~~
>
> --
> Some important links for excel users:
> 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
> http://www.excelitems.com
> 2. Excel tutorials at http://www.excel-macros.blogspot.com
> 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
> 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
>
> To post to this group, send email to excel-macros@googlegroups.com
> If you find any spam message in the group, please send an email to:
> Ayush Jain  @ jainayus...@gmail.com or
> Ashish Jain @ 26may.1...@gmail.com
> <><><><><><><><><><><><><><><><><><><><><><>
> HELP US GROW !!
>
> We reach over 6,500 subscribers worldwide and receive many nice notes about
> the learning and support from the group. Our goal is to have 10,000
> subscribers by the end of 2009. Let friends and co-workers know they can
> subscribe to group at
> http://groups.google.com/group/excel-macros/subscribe
> -~--~~~~--~~--~--~---
>
>


-- 
Hemant Hegde

-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-11 Thread Hemant Hegde
Hi :)

Why do you want to do that with the poor user? (he will have to re-open it
and probably with macros turned off)

You can

Protect the sheet or

Set the scroll area by putting this code :
Sheets("name").scrollArea="A1:Z10"

If you anyway want to close the workbook, this can help

write

If not isblank(target) then:thisworkbook.close(false)

inside worksheet_change() event


With regards

Hemant Hegde


On 10/11/2009, OSAVentures Calamba  wrote:
>
> Dear Paul and gurus,
>
> I want to find the last row. Is this OK?
>
> Private Sub Worksheet_Change(ByVal Target As Range)
>
> Dim LastRow As Long
>
>   If WorksheetFunction.CountA(Cells) > 0 Then
> 'Search for any entry, by searching backwards by Rows.
> LastRow = Cells.Find(What:="*", After:=[A1], _
>  SearchOrder:=xlByRows, _
>  SearchDirection:=xlPrevious).Row
> MsgBox LastRow & " You cant go beyond this workbook closed."
>
> end sub
>
> or somthing like this.
>
> Private Sub Worksheet_Change(ByVal Target As Range)
>
> Dim LastRow As Long
> LastRow = ActiveSheet.UsedRange.Rows.Count
> if LastRow=>10 then
>
> MsgBox LastRow & " You cant go beyond this workbook closed."
> endif
> end sub
>
> Thanks
>
> On Mon, Nov 9, 2009 at 8:34 PM, Paul  wrote:
>
>>
>> What do you mean by "last row with data = 10"?
>> do you mean that row #10 has data?
>> or that the last row with data has a VALUE of 10 in a specific column?
>> will there be data in rows 1-9?
>> What columns will the data be in? look for ANY data in row 10?
>>
>> What do you want to use to trigger the event?
>> When does the last row change to 10?
>>
>> do you want to save the workbook when it closes?
>>
>> You could create an event:
>> Private Sub Worksheet_Change(ByVal Target As Range)
>>
>> test for whatever you're testing for:
>>  If (Target.Row = 10) then
>>
>> then:
>>
>>
>> ThisWorkbook.Close savechanges:=False
>>
>>
>>
>>
>> On Nov 8, 11:31 pm, OSAVentures Calamba  wrote:
>> > dear gurus,
>> >
>> > i need to close a workbook if last row with data =10,  Any VBA
>> suggestion
>> > please?
>> >
>> > dellosa
>>
>>
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Store Cell formatting

2009-11-11 Thread Hemant Hegde
Hi

Thank you Paul and RolfJ

The file I want to save in binary format already contains 4 ararys of
variable size (these are to store: the file version info, settings and user
preferences, main data, and other data)

The excel formatting I and values I am trying to save is just a part of the
above said file. I dont want to create two files (one myformat.svi and
another, excel.xls) but to include it in the same file.

Furthermore I want the file to be as small as possible because the data to
be save can be accounting transactions data which can run into any length...

If I am able to convert different combinations (there wont be many) of cell
formatting into a number (preferably between 0 - 255 so that i can store
that as a Byte) It would make my file smaller than excel's own format.

What I mean by different combinations is:

a Byte with value 0 may mean [ Font color=*Black*, Backgroung color=white,
Bold=*False*, Font ="Arial"] and

a Byte with value 1 may mean [ Font color=*Red*, Backgroung color=white,
Bold=*True* Font ="Arial"] and

and so on untill its 255 and I think more combinations wont be required.


Another important reason to do that is to avoid recalculation when the user
makes only a small change which affects only few values (or formatting) in
the final report..

I dont know if applying the cell formatting to each cell one after another
takes same [or more :( ! ] amount of time as a total recalculation!!

It will be nice if you advice me if I can do it in some other way. I heard
"*.DLL" and *.XLL" files are faster? will these help?

Thank You
Hemant Hegde


On 10/11/2009, RolfJ  wrote:
>
>
> Please explain why you don't save the worksheet resulting from your
> calculations in the intrinsic Excel format (i.e. as an Excel
> workbook).
>
> On Nov 8, 12:20 pm, Hemant Hegde  wrote:
> > Hi
> >
> > After a lot of coding and lengthy calculations (takes up to 2 minutes) I
> get
> > a sheet (actually a report) with lot of numbers and different cell
> > formatting.
> >
> > Now I need to store the cell values together with cell formatting in a
> > binary file to avoid repeated lengthy calculations.
> >
> > The only option I able to think is to store all the formatting values one
> > after another in the binary file eg. For cell's background colour, I will
> > have to store the value of cells(1,1).interior.colorindex as a number and
> > write it to the binary file. While opening the binary file, it has to
> read
> > it and apply it back to the cell.
> >
> > Any better Idea?
> >
> > Im sorry if I failed to explain correctly what i want to do!
> > Can I get all the formatting of a cell as a single number or a string by
> any
> > means?
> >
> > Professional programmers help me please
> >
> > --
> > Hemant Hegde
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: InputBox

2009-11-10 Thread Hemant Hegde
Hi Tommy

Where did you get the code "name.copy" ? It doesnt work that way.

Its very simple

just write Range("a1")=name

when you use "=" operator, the value on the right hand side is assigned to
the variable on left side"

2009/11/9 Tommy 

>
>
> I need to be able to insert text into a cell using the “inputbox”
> function linked to a button. The macro below allows me to input the
> text, but getting it to go somewhere eludes me. I realize that
> "Copy.Name" doesn't work but how do i direct the entered text to a
> cell? Suggestions appreciated.
>
> Tommy
>
> Sub New_Name()
> Name = Application.InputBox("Enter New Name")
> Copy.Name
> Range("A1").Select
> ActiveSheet.Paste
> End Sub
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Store Cell formatting

2009-11-08 Thread Hemant Hegde
Hi

After a lot of coding and lengthy calculations (takes up to 2 minutes) I get
a sheet (actually a report) with lot of numbers and different cell
formatting.

Now I need to store the cell values together with cell formatting in a
binary file to avoid repeated lengthy calculations.

The only option I able to think is to store all the formatting values one
after another in the binary file eg. For cell's background colour, I will
have to store the value of cells(1,1).interior.colorindex as a number and
write it to the binary file. While opening the binary file, it has to read
it and apply it back to the cell.

Any better Idea?

Im sorry if I failed to explain correctly what i want to do!
Can I get all the formatting of a cell as a single number or a string by any
means?

Professional programmers help me please

-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Creating Txn file

2009-11-08 Thread Hemant Hegde
Hi :)

I saw your file. Its fine but what are

401114 and

40120

in

TXN40114ForG
 TXN40120ForH

Some random numbers or what ?;)



On 07/11/2009, Prasad Gadgil  wrote:
>
> *Dear All Excel Gurus,*
>
> I have one problem creating transaction file.
>
> Please find attached file showing input table & expected output
>
> I will be really grateful to all of you if you help me in creating macro
> where i can get the output as expected.
>
> *Thanks & Regards
> Prasad Gadgil
> Cell:9819442088*
>
> >
>
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Need a function or formula

2009-11-08 Thread Hemant Hegde
@Pooja

Hi

If you want an accurate solution, you start with a sample data, big enough
to include all possible patterns of raw data. The initial sample you
attached did not contain all possible patterns.

=Len()
=Mid(,,,)
=Left(,,)
=Right(,,)
=ISERROR()
=IF(,,,)
=SEARCH(,,,)

I suggest you to understand these functions yourself (these are not so
difficult and powerful enough handle most of text data manipulations) and
try to identify the pattern of your raw data and see if they:

1) BEGIN and/or END with a CERTAIN character(s) (eg "_", "e-" or a )

2) have a FIXED LENGTH (eg: you ALWAYS don't want the first 5 digits of a
number)

3) If none of the above are applicable, just see how you identify
the information you require from a raw data, and tell the computer to do the
same! Well the computer may ask you to give each and every break-up of the
procedure!

Good Luck :)
Hemant Hegde
-
@All

It would be nice if forums like this which have got a big number of experts
and professional programmers should help a member to learn rather than being
a place where we can post some files of which we forgot the password and and
wish someone would break it for us.

I had asked for a help about dealing with Importing code to a code module.
But I got suggestions about how to search the web better with Google ;) and
how to make the query short and interesting [yes! it did help! :)]

But I am unhappy that no one bothered to answer my last few posts :(

Good Day :)

Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Question

2009-11-07 Thread Hemant Hegde
Hi sudhir

For that purpose, I had created a file and uploaded at
www.hemant.caclubindia.com . You can download it there.

But you may have to sign up



On 07/11/2009, sudhir kumar  wrote:
>
> Hi firends
>
> My Question is how to convert numerical in words to
> in Ms Excel ?
>
>
>
> --
> sudhir
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Problem with Calling a Sub in a Module from a Form

2009-11-07 Thread Hemant Hegde
I guess when you are passing some values to a sub, You should use "Call"
keyword

Try

Call Modul1.Get_Param(CInt(TextBox1.Text), CInt(TextBox2.Text))


Hemant Hegde


2009/11/6 laudes 

>
> Hi all
>
> I've got a problem and it seems, that I'm not able to solve it without
> your help. Needless to say anything more about my programming-
> skills ;-)
> There is a Form and a Module in my Workbook. I try to pass User-Input
> from the  Form to a Sub in the Module.
>
> If I call the Sub from inside the Form by using the On_Click Event of
> a Button, Excel throws an error:
>
> "Error while compiling:
> Expected: ="
>
> Here is how I try it:
>
> --function in the
> module-
> Public Sub Get_Params (Stichjahr As Integer, Stichmonat As Integer)
> 
> End Sub
>
> --function call in the
> Form--
> Modul1.Get_Param(CInt(TextBox1.Text), CInt(TextBox2.Text))
>
> Can anybody Help?
> Thank you very much in advance
>
> >
>

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Segregate data in appropriate sheet with Name as sheet name

2009-11-03 Thread Hemant Hegde
Hi

I think you are saying you have many columns with headings "ramesh",  "ravi"
etc and you want a macro which will create as many sheets as the number of
columns you have with the respective names and segregates the data in the
columns to respective sheets right?

It is possible.

But why do you want to do that?

I, by experience know that its better to have data in a single sheet in a
table format than in different sheets so that we can use advanced features
of excel like pivot tables effectively.


Hemant Hegde


2009/11/3 Chanti 

>
>
> Hi Team,
>>
>> Is there a way we can segregate the data depending upon the name
>> (column A) to different tabs.
>>
>> Example
>> If it is a macro, and if I run it, the result would be:
>>
>> Sheet names:  “Ramesh”, Ravi”, “Rakesh”, and “Sridhar” and each tab
>> would contain the data as per the sheet name.
>>
>> I hope this is a confusing request, please let me know if you have any
>> questions.
>>
>> Thanks in advance
>> Ramesh
>>
>
>
>
> --
> Thanks!!!
>
> >
>

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: need macro for a simple vlookup and pivot

2009-11-02 Thread Hemant Hegde
Hi

I did not understand what you want to accomplish with a VBA code.

But can i pls know why you hate recorded macros?


Hemant Hegde


2009/11/2 vinod rao 

> HI Team,
>
> Need a VBA code for doing pivot - below condition is needed
>
>
>
>
>  1
>  Z F C
>  I am eliminating these from pivot table, see pivot for more details
>  2
>  if name k is available it should be considered in pivot
>  3
>  I don’t want recorded vba macro
>
>
>
> Second simple macro on vlookup. See attached sheet.
>
> Thanks in advance.
> Regards,
> Vr
>
> >
>

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: $$Excel-Macros$$

2009-11-01 Thread Hemant Hegde
good luck friend ! :)

Hemant Hegde


2009/11/1 karthikeyan sankaran 

> I have download this data from PDF.Now I want to create pivotTable through
> this data. <http://groups.google.com/group/excel-macros/subscribe>
>
> >
>

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Need a function or formula

2009-11-01 Thread Hemant Hegde
Hi Pooja

Pls find the attached sheet


Hemant Hegde


2009/10/31 Pooja Sharma 

> Hi All,
>
> I need your help in extracting some words (having defined format) from one
> cell in another cell. Attached is a sheet where I have mentioned the case
> and the solution I require.
>
> Hope you will help me.
>
> Best Regards
> Pooja Sharma
> ***
>
> >
>

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



Solution on the Data.xls
Description: MS-Excel spreadsheet


$$Excel-Macros$$ How to do this?

2009-10-29 Thread Hemant Hegde
Hi


I have an excel sheet (attached) having a table with 3 columns, "Entry
Number", "Party Name" and "Amount"

In the result sheet I have:

1) In the row first row: selected values from "Party Name"

2) In the first column: selected values from "Party Name" (though from the
same field as the first row, items are mutually exclusive)

What result I want to get is:

For each intersection of row and column items in the result sheet, sum of
the field "Amount" where the "Entry number" is same.

I tried many combinations of array formulae but could not get the result.
But I think it is possible..

any help pls?

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



PlsHelp.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


$$Excel-Macros$$ Re: Need help in Pivot table

2009-10-29 Thread Hemant Hegde
Hi

See attached file


2009/10/29 Mahesh 

> Dear Frineds,
>
> Please help me to solve the  problem in attached sheet.
>
>
>
>
> --
> With Love,
> Mahesh Bisht
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



Copy of Xl000.xls
Description: MS-Excel spreadsheet


$$Excel-Macros$$ Re: Excel values to Website, HTML extraction back to Excel. PLEASE Help!!!

2009-10-28 Thread Hemant Hegde
Hi

Sorry.. I am not able to help in this regard now because I don't have much
knowledge about that.

But what you have posted here is what I was searching on the net for so many
days but wasn't able to  get.

Thank you so much. :)

I will now do some trial and error with your code.

I will post it back if I get any success..


With regards,
Hemant

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Macro Virus, Digital Certificate

2009-10-28 Thread Hemant Hegde
Hi Experts,

I had a disappointing experience..

I have a workbook with a VBA project which I carry to my clients' place when
I go for audit and sometime run it on their machines.

Yesterday an antivirus program in client's computer deleted all the the VBA
code in my workbook calling it a "Macro Virus!". It did not even prompt as
to what should be done with the file!

In my code I have made references to the code module and it requires "Trust
access to VBA" enabled. It might have appeared to be self replicating to the
antivirus.

But I don't want to remove that part of the code.

Is there any way eg. I will digitally sign the workbook or some other person
will certify it and the above situation be avoided?

Thanking you
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: New user VBA to help random sheet

2009-10-28 Thread Hemant Hegde
Hi Simon

If you are already using excel to select random samples, I guess you are
familar with excel formulae.

VB is not required for this purpose. I have already uploaded a file here for
almost the same kind of problem. With smal modifications, the file I have
uploaded may serve your purpose.

Visit my profile or search the group. You will find the attachment


Best regards,

Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Problem with calling macro periodically and automatically

2009-10-27 Thread Hemant Hegde
Hi praveen

to disable an ontime event, you need to know the scheduled time.
So, declare a module level variable to store the schedule time. Use the same
to disable the event





2009/10/27 Praveen Khunte 

> Hi Everyone
>
> I have used a macro given in site
> http://www.cpearson.com/excel/OnTime.aspx
>
> This code copy cell D4 and paste to D30 automatically after every 2 minutes
> when you press “start timer” button.
>
> But when I press “Stop timer” button, the macro didn’t stop and keeps on
> continuing even when workbook is closed.
> Can anyone please figure out why StopTimer() is not working?
>
> Regards
> Praveen
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Conditional Formating of more than one cell

2009-10-27 Thread Hemant Hegde
Hi


If I understood correctly what you are trying to do, I would suggest you to
use "RefEdit" control which you may find in the additional controls dialog
box in form toolbox. It will allow the user to select a range from the
worksheet.

then u can use the following code (supposing the name of the RefEdit control
is RefEdit1)

On error resume next
Range(RefEdit1).interior.colorindex=rgb(100,20,20)


Best regards

Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: TO PASTE THE DATE IN ATTACHED FORMAT & VALIDATE IT

2009-10-27 Thread Hemant Hegde
The validation macro used by sales tax department is really stupid..

I have not checked your workbook but I have tried a workbook downloaded from
Karnataka state VAT dept.

Every time I download the workbook from their site, they would have changed
it and it will give new error messages.

Try filing paper returns! ;)

2009/10/27 RolfJ 

>
> Hi Rahul:
>
> I didn't say that your WORKBOOK is password-protected. However the
> MACROS that are associated with it ARE password-protected!!! It would
> help to know whether you are familiar with Excel macros.
>
> Thanks for bearing with me,
> Rolf
>
> On Oct 26, 4:15 am, RAHUL GARG  wrote:
> > HI ROLF,
> >
> > THE WORKBOOK IS NOT PROTECTED BY MY PASSWORD, THE PVAT-18.XLS FILE IS A
> SALE-TAX FILE IN WHICH WE HAVE TO SUBMIT OUR E-RETURNS.I DOWNLOAD IT FROM
> THE WWW.PEXTAX.COM OTHER THINGS LIKE BILL NO. PARTY NAME PASTE EASILY &
> VALIDATE OPTOIN GIVEN AT THE END VALIDATE THE SAME, WHICH IS ESSENTAIL FOR
> UPLOADING THE FILE TO THE SALE-TAX SITE. BUT WHEN WE PASTE THE DATE IN THE
> ABOVE SAID FILE .THE VALIDATE OPTION DOES NOT VALIDATE THE DATA. SO I
> HAVE ASKED TO YOU & DEAR EXCEL MACROS FRIEND IS THERE ANY WAY TO PASTE THE
> DATE IN THE FILE & VALIDATE THE SAME.
> >
> > THANKS FOR YOUR REPLY.
> >
> > RAHUL GARG
> >
> > --- On Fri, 23/10/09, RolfJ  wrote:
> >
> > From: RolfJ 
> > Subject: $$Excel-Macros$$ Re: TO PASTE THE DATE IN ATTACHED FORMAT &
> VALIDATE IT
> > To: "MS EXCEL AND VBA MACROS" 
> > Date: Friday, 23 October, 2009, 10:46 PM
> >
> > Hi Rahul:
> >
> > you will need to provide a LOT more information than this if you want
> > anyone to assist you with this problem. The first thing I noticed when
> > I opened your workbook was that you password protected your macros.
> > That's not a great start, because it prevented me from trying to
> > understand what you mean by 'IT'S VALIDATE OPTION'.
> >
> > Best wishes,
> > Rolf
> >
> > On Oct 21, 12:33 am, RAHUL GARG  wrote:
> >
> > > DEAR ALL,
> > >
> > >
> > > PLEASE HELP ME HOW I CAN PASTE THE DATE FROM AN ORDIANRY EXCEL FILE IN
> TO THE ATTACHED FILE. ALL OTHER THINGS SUCH AS PARTY NAME,B.NO. PASTE
> EASILY , BUT WHEN WE PASTE THE DATE IT'S VALIDATE OPTION DOES NOT VALIDATE
> IT WHICH IS ESSENTIAL. SO, PLEASE DO THE FAVOR FOR ME TO REDUCE MY WORK.
> > >
> > > THANKS & REGARDS,
> > > RAHUL GARG,
> > >
> >
> > >   From cricket scores to your friends. Try the Yahoo! India
> Homepage!http://in.yahoo.com/trynew
> >
> > >  PVAT-18.xls
> > > 640KViewDownload
> >
> >   Keep up with people you care about with Yahoo! India Mail. Learn
> how.http://in.overview.mail.yahoo.com/connectmore
> >
> >  PVAT-18.xls
> > 640KViewDownload
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Need Urgent Help (While Statement)

2009-10-26 Thread Hemant Hegde
Hi Anish

If you are simplifying the code, you can even reduce your code to less than
20 lines from 100s of IF conditions

1) Create a sheet named "Replace Values"

2) Make 3 columns with the headings:

a) "Find Text"  (col A)

b) "Replace Text" (col B)

c) "Alternative text" (col C)


3) Write in (Col A) values you want to find and replace (Use the wild cards
here and not in the code! you may write "*SALES*" or *Sales?*" or other
patterns)

4) Write in (Col B) the new value to be written if the condition is
satisfied

5) Write in (Col C) the new value to be written if the condition is NOT
satisfied


6) Now write the following code:

j=1
'write your While-wend loop here!
'
For i = 2 to sheets("Replace Values").cells(1,65000).end(xlup).row
if  cells(j,1) like Sheets("Replace Values").cells(i,1) then
cells(j,1)=Sheets("Replace Values").cells(i,2)
else
cells(j,1)=Sheets("Replace Values").cells(i,3)
endif
Next i
'---
j = j+1
'Wend!

I have not tested this code yet.

Pls test and let me know if its not working

2009/10/26 Hemant Hegde 

> Hi Anish
>
> Its not the problem with "WHILE" or "WEND"
>
> Make sure you have closed all "IF" conditions with "END IF" at proper
> places
>
> Just check if you have started an IF condition inside the loop and tried to
> close it after the loop
>
> 2009/10/26 Anish Shrivastava 
>
>> Hello Experts..
>>
>> I m using While and Wend statement in my code and it has got more than 100
>> if conditions. when I run the macro it says "WEND WITHOUT WHILE", it's
>> buggin my head...and I don know wht's wrong. Could anyone of you please help
>> me...
>>
>> Sample code...
>>
>> Sub dept()
>> i = 1
>> z = Cells(Rows.Count, "B").End(xlUp).Row
>> While i <= z
>> If Cells(i, 2).Value Like "*FINANCE*" Then
>> Cells(i, 4) = "FINANCE / ACCOUNTING"
>> Else
>> If Cells(i, 2).Value Like "*ACCOUNTS*" Then
>> Cells(i, 4) = "FINANACE / ACCOUNTING"
>> Else
>> If Cells(i, 2).Value Like "*SALES*" Then
>> Cells(i, 4) = "SALES"
>> *(IN BETWEEN THR R MORE THAN 100 IF CONDITIONS LIKE THIS)*
>> endif
>> endif
>> endif
>> i=i+1
>> wend
>> end sub
>>
>> -best
>> ANISH
>>
>>
>
>
> --
> Hemant Hegde
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Need Urgent Help (While Statement)

2009-10-26 Thread Hemant Hegde
Hi Anish

Its not the problem with "WHILE" or "WEND"

Make sure you have closed all "IF" conditions with "END IF" at proper places

Just check if you have started an IF condition inside the loop and tried to
close it after the loop

2009/10/26 Anish Shrivastava 

> Hello Experts..
>
> I m using While and Wend statement in my code and it has got more than 100
> if conditions. when I run the macro it says "WEND WITHOUT WHILE", it's
> buggin my head...and I don know wht's wrong. Could anyone of you please help
> me...
>
> Sample code...
>
> Sub dept()
> i = 1
> z = Cells(Rows.Count, "B").End(xlUp).Row
> While i <= z
> If Cells(i, 2).Value Like "*FINANCE*" Then
> Cells(i, 4) = "FINANCE / ACCOUNTING"
> Else
> If Cells(i, 2).Value Like "*ACCOUNTS*" Then
> Cells(i, 4) = "FINANACE / ACCOUNTING"
> Else
> If Cells(i, 2).Value Like "*SALES*" Then
> Cells(i, 4) = "SALES"
> *(IN BETWEEN THR R MORE THAN 100 IF CONDITIONS LIKE THIS)*
> endif
> endif
> endif
> i=i+1
> wend
> end sub
>
> -best
> ANISH
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Random Sampling

2009-10-25 Thread Hemant Hegde
Hi sarang

I created a worksheet (attached) which with necessary modifications should
meet your sampling requirements. I have not used any VB code in that. But
for further manipulation and management of data, I think you already have
required code





2009/10/25 Sarang84 

>
> I'm trying to build a macro (code) that can be used as an automated
> tool for a sampling module that is part of a data quality / assurance
> process. This sampling process needs to be done for various users.
> i.e. samples have to be chosen for a set of users according to certain
> pre-defined conditions. I'm trying to pick out sample rows from a
> sheet of data by constantly filtering the source data.
>
> To understand more clearly of my requirement, read on...
>
> I've a big chunk of data in a sheet from where i need to pick out
> sample rows of data (at random) according to some pre-defined
> conditions (I may need to over-ride these conditions at times when any
> of the conditions do not apply). I'll use auto-filtering a lot which
> will export data to many worksheets created at runtime. But at the
> end, the sample rows need to be consolidated (few samples) together
> from all such sheets created.
>
> I've already coded few modules and I'm trying to build a master module
> where I can integrate everything together. But I'm currently engrossed
> with some shortfalls in the existing modules which i need to fix
> before the final integration of the entire working code which can be
> tested. If i come across any bugs i need to work around those too.
>
> I'm exploring for code across the web through forums / blogs / groups
> to accomplish the following:
>
> •   Keep some track of data that needs to be exported (which can be
> done with one of the existing modules) and then creating (sort of) a
> recordset (like in a database) where i can store the samples. In other
> words, when I want to export data to new sheet(s), I only need to
> determine the filtered rows and not actually exporting the whole data
> at that point of time (when the code is in execution) which can be
> stored temporarily (in an array or a defined data structure).
>
> •   Since i want to choose random samples for various users – at the
> end of an execution step for an user (say), i'll have to set some sort
> of flagging points (to identify the rows that have met the sampling
> conditions) and also need to randomly sample out these identified
> rows. Probably, these flags can be cleared out every time and reset
> but I also should take care of the overriding conditions
>
> This way I can have a control of the data being copied to many sheets
> from the master sheet (to avoid duplication) and also can consolidate
> the samples chosen for various users to a single sheet.
>
> If need be, i can post the modules i've created, but i don't know how.
>
> Can anyone help me with some coding / suggestions with which I can
> accomplish the above?
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



Sampler.xls
Description: MS-Excel spreadsheet


$$Excel-Macros$$ Re: Run Excel Macro?

2009-10-24 Thread Hemant Hegde
Hi Holsten and Rolf

You can create a new instance of an excel application with this code

Sub Test()
Dim X As Object
Set X = CreateObject("excel.application")
X.Workbooks.Add
'X.Visible = True
'---
'Your code here..
X.ActiveWorkbook.ActiveSheet.Cells(1, 1) = "It works!"
'---
X.DisplayAlerts = False
X.ActiveWorkbook.SaveAs "C:\temp.xls"
X.DisplayAlerts = True
X.Quit
Set X = Nothing
End Sub


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Excel Query

2009-10-23 Thread Hemant Hegde
Hi


I forgot to put cell references before posting the file here..

I think you can look into the formula yourself and replace the constant
values like "A" with the corect cell references like $C$6..



2009/10/23 

>   Thanx for your HELP.
>
> But my query is when I enter “A” or “B” automatic data display,(looks like
> Vlookup formula)
>
>
>
>
>
> *From:* excel-macros@googlegroups.com [mailto:
> excel-mac...@googlegroups.com] *On Behalf Of *Hemant Hegde
> *Sent:* Thursday, October 22, 2009 8:45 PM
> *To:* excel-macros@googlegroups.com
> *Subject:* $$Excel-Macros$$ Re: Excel Query
>
>
>
> Hi Malek*
>
> *I have attached the solution to your problem.
>
>
> But can you people please give some introduction about your querry in the
> message? This is because many people including me like to go through
> interesting querries but without spending much time on downloading the
> attachment..
>
> Regards
>
> Hemant Hegde
>
>  2009/10/22 
>
> Can any one solved my problem??
>
>
>
>
>
> *Malek Sarfraj*
>
>
>
>
>
>
>
> *DISCLAIMER:*
>
> Please note that this e-mail and its attachments are intended for the named
> addressee only and may contain information that is confidential and
> privileged. If you have by coincidence or mistake or without specific
> authorization received this e-mail and its attachments we request that you
> notify us immediately that you have received them in error, uphold strict
> confidentiality and neither read, copy, nor otherwise make use of their
> content in any way. Please note that the sender of this e-mail and its
> attachments is solely responsible for its content if it does not concern the
> operations of Intas group or its subsidiaries.
>
>
>
>
>
>
>
>
> --
> Hemant Hegde
>
>
>
>
> *DISCLAIMER:*
>
> Please note that this e-mail and its attachments are intended for the named
> addressee only and may contain information that is confidential and
> privileged. If you have by coincidence or mistake or without specific
> authorization received this e-mail and its attachments we request that you
> notify us immediately that you have received them in error, uphold strict
> confidentiality and neither read, copy, nor otherwise make use of their
> content in any way. Please note that the sender of this e-mail and its
> attachments is solely responsible for its content if it does not concern the
> operations of Intas group or its subsidiaries.
>
> >
>
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Excel Query

2009-10-22 Thread Hemant Hegde
Hi Malek*

*I have attached the solution to your problem.


But can you people please give some introduction about your querry in the
message? This is because many people including me like to go through
interesting querries but without spending much time on downloading the
attachment..

Regards

Hemant Hegde
*
*
2009/10/22 

>   Can any one solved my problem??
>
>
>
>
>
> *Malek Sarfraj***
>
>
>
>
>
> *DISCLAIMER:*
>
> Please note that this e-mail and its attachments are intended for the named
> addressee only and may contain information that is confidential and
> privileged. If you have by coincidence or mistake or without specific
> authorization received this e-mail and its attachments we request that you
> notify us immediately that you have received them in error, uphold strict
> confidentiality and neither read, copy, nor otherwise make use of their
> content in any way. Please note that the sender of this e-mail and its
> attachments is solely responsible for its content if it does not concern the
> operations of Intas group or its subsidiaries.
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



Solution -Excel Query.xls
Description: MS-Excel spreadsheet


$$Excel-Macros$$ Re: Insert file path and name into cell

2009-10-22 Thread Hemant Hegde
Use this code Jp,

Sub get_path ()
Dim x as string
x=Application.getopenfilename
If not x="FALSE" then: Activecell=x
End sub


:)
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Set reference through VBA

2009-10-21 Thread Hemant Hegde
Why dont you include the original vb code in the new workbook?

use

application.savecopyas("\\path\name.xls")

Or

if you are anyway closing the original workbook

'delete unwanted sheets and save
applcation.displayalerts=false
sheets("unwanted1").delete
sheets("unwanted2").delete
thisworkbook.saveas("\\path\name.xls")
applcation.displayalerts=true
thisworkbook.close(false)







2009/10/19 Doug 

>
> Hello, again.
>
> I have a workbook which creates a new worksheet each day. When the
> worksheet is completed for the day, it is then saved as a new
> workbook. The original workbook is set to reference an xla add-in that
> I made but the newly created workbook doesn't have the reference.
>
> Can someone please tell me how to set the reference to a custom made
> add-in automatically through code?
>
> Thank you.
> Doug
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Run Excel Macro?

2009-10-21 Thread Hemant Hegde
I am not much familar with data connections to/from excel or automating
emails but I remember when I had checked "data query" property (i got it by
right-clicking on a cell in a sheet having external data connections) I had
seen an option for "background refresh". When I enabled this feature, excel
was available for use while it refreshed the data in the background.

Have you noticed that when an excel application is busy (running a macro
etc.) you could always open a separate excel application using [WINDOWS + R]
key and entering "excel" in the dialog box?

Why don't you run a separate excel application programatically (i guess you
can even keep it invisible), get the data refreshed and values copied to the
original workbook later when the refresh is complete?

Please let me know if any of the above solve the problem

Can you please email me the workbook (or a part of it) which you use to send
emails to yourself or any other way of posting data from an excel workbook
to a web site? I prefer the easiest way of doing it. That is may be like by
generating an easy url like
http://mywebsite.com/?mymsgsub=test%message?body=blah%blah%blah   and
without depending on a configured MS Outlook account.


Thank you
:)
-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: getting option buttons to work

2009-10-17 Thread Hemant Hegde
Use this code friend

Sub Test()
On Error GoTo Ext:
Dim X As Range
Set X = Columns("D:D").SpecialCells(xlCellTypeBlanks)
X.Cells(1, 1) = 1
X.Cells(1, 2) = 30
Ext:
Exit Sub



-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Need a formula in picking right status

2009-10-16 Thread Hemant Hegde
Hi friend


I have tried to solve. Please find the attachment


Happy Deepavali to all

Hemant Hegde



2009/10/15 vinod rao 

> HI Expert Guru,
>
> I need a formula in finding status in column G. For reference the result
> expected is given in column J.
>
> The contion is the status should be picked based on the latest date.
> condition 2 is if the date is same for expire and active consider active
>
> At least i want the first condition to satisfy, provided the second
> conditon is difficult in finding formula.
> kindly find attached xls file attached, fyi,I am using 2003 xls.
>
> Wish you all the happy DWALI!!
> VR
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



Solution_Texting5.xls
Description: MS-Excel spreadsheet


$$Excel-Macros$$ Re: Plz Help

2009-10-12 Thread Hemant Hegde
Hi Prashant
Please find the attached solution


Hemant Hegde


2009/10/11 Prashant Bhawar 

>
> Plz help here i attached a problem file with required ans. plz help me
> --
> Warm Regard
>
> Prashant Bhawar
>
> ( CA  Final )
>
> >
>


-- 
Hemant Hegde

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



PROBLEM.xls
Description: MS-Excel spreadsheet