Location of string differences

I have a problem with comparing two strings, string1 and string2.  string2 
will be a manually edited version of string1 so will have had 
words/punctuation added/deleted and characters changed to/from Caps.

Comparing the two strings (in vba, Excel 2007) to find if they are identical 
(case sensitive) is not a problem as I can use strcompar(). but I wish to 
locate where the differences occur.  Detecting the first one would help but 
it would be nice to continue and find where they now become identical again.

Any suggestion would be appreciated.  I am using Excel 2007 under Windows XP 
sp2 and have quite good vba skills.

TIA
Chris



0
ng4206 (77)
8/24/2011 7:18:59 AM
excel 39879 articles. 2 followers. Follow

7 Replies
440 Views

Similar Articles

[PageSpeed] 58

On Aug 24, 2:18=A0am, "Chris Watts" <n...@ctwatts.plus.com> wrote:
> I have a problem with comparing two strings, string1 and string2. =A0stri=
ng2
> will be a manually edited version of string1 so will have had
> words/punctuation added/deleted and characters changed to/from Caps.
>
> Comparing the two strings (in vba, Excel 2007) to find if they are identi=
cal
> (case sensitive) is not a problem as I can use strcompar(). but I wish to
> locate where the differences occur. =A0Detecting the first one would help=
 but
> it would be nice to continue and find where they now become identical aga=
in.
>
> Any suggestion would be appreciated. =A0I am using Excel 2007 under Windo=
ws XP
> sp2 and have quite good vba skills.
>
> TIA
> Chris
http://www.google.com/#hl=3Den&cp=3D20&gs_id=3D28&xhr=3Dt&q=3Dexcel:compare=
+string&qe=3DZXhjZWw6Y29tcGFyZSBzdHJpbmc&qesig=3DIcdx8BpMzItfq5HoXXeG7g&pkc=
=3DAFgZ2tkmaidcPyEw1keuqnBBFjiXFhVqcxMpxluJvOsBg-UMIOa5sJalg8cIJEkNDiZ1bJfk=
4gtXjUeU6vMLz_M9ee1f1a15_w&pf=3Dp&sclient=3Dpsy&source=3Dhp&pbx=3D1&oq=3Dex=
cel:compare+string&aq=3Df&aqi=3D&aql=3D&gs_sm=3D&gs_upl=3D&bav=3Don.2,or.r_=
gc.r_pw.&fp=3D80a7ff9ca756264&biw=3D888&bih=3D559

Could be easy or difficult depending on your text. Perhaps data>text
to columns to break up and then compare or something like this. If all
else fails you could do a for i=3D 1 to len(a1) to compare character by
character....

=3D=3D=3D=3D=3D=3D=3D=3Dhttp://dmcritchie.mvps.org/excel/strings.htm
String Comparisons, compare to second space   (based on posting
2003-01-090

Formulas include concatenation of two spaces to guarantee finding the
second space in each case.
a14:   BA 12345 10-30-2003 must be ---> BA 12345
B14:   NM 12345 AB 40893 Must be ----> NM 12345
D14"  =3DIF(UPPER(LEFT(A14 & "  ",FIND(" ",RIGHT(A14 & "  ",LEN(A14 & "
")
            -FIND(" ",A14 & "  ")))+FIND(" ",A14 & "  ")))=3D
          UPPER(LEFT(B14 & "  ",FIND(" ",RIGHT(B14 & "  ",LEN(B14 & "
")
            -FIND(" ",B14 & "  ")))+FIND(" ",B14 & "
"))),"Equal","Differs")

or  using a programmed User Defined Function

A14:  BA 12345 x
B14:  BA 1234
C14:  ba 12345
D14: =3DCompareTruncate(A14,B14)  -- shows Differs
E14: =3DCompareTruncate(A14,C14)  -- Equal

Function CompareTruncate(ByVal string1 As String, ByVal _
      String2 As String)
    string1 =3D Left(string1 & "  ", InStr(InStr(string1 & "  ", " ") +
1, _
        string1 & "  ", " "))
    String2 =3D Left(String2 & "  ", InStr(InStr(String2 & "  ", " ") +
1, _
        String2 & "  ", " "))
    '-- CompareTruncate =3D UCase(string1) =3D UCase(String2)--replaced
by...
    CompareTruncate =3D InStr(1, String2, string1, vbTextCompare) =3D 1
End Function
0
dguillett11 (103)
8/24/2011 12:47:57 PM
On Wed, 24 Aug 2011 08:18:59 +0100, "Chris Watts" <ng@ctwatts.plus.com> wrote:

>I have a problem with comparing two strings, string1 and string2.  string2 
>will be a manually edited version of string1 so will have had 
>words/punctuation added/deleted and characters changed to/from Caps.
>
>Comparing the two strings (in vba, Excel 2007) to find if they are identical 
>(case sensitive) is not a problem as I can use strcompar(). but I wish to 
>locate where the differences occur.  Detecting the first one would help but 
>it would be nice to continue and find where they now become identical again.
>
>Any suggestion would be appreciated.  I am using Excel 2007 under Windows XP 
>sp2 and have quite good vba skills.
>
>TIA
>Chris
>
>

Chris,

Please provide some examples of your inputs and desired outputs.

One thought that comes to mind is that you could do a character by character comparison, building up a binary value, and work from that.

0
ron6368 (329)
8/24/2011 12:54:08 PM
"Don Guillett" <dguillett1@gmail.com> wrote in message 
news:6b3e1d3d-52de-4c1b-8d70-85f757b48523@s12g2000yqm.googlegroups.com...
On Aug 24, 2:18 am, "Chris Watts" <n...@ctwatts.plus.com> wrote:
> I have a problem with comparing two strings, string1 and string2. string2
> will be a manually edited version of string1 so will have had
> words/punctuation added/deleted and characters changed to/from Caps.
>
> Comparing the two strings (in vba, Excel 2007) to find if they are 
> identical
> (case sensitive) is not a problem as I can use strcompar(). but I wish to
> locate where the differences occur. Detecting the first one would help but
> it would be nice to continue and find where they now become identical 
> again.
>
> Any suggestion would be appreciated. I am using Excel 2007 under Windows 
> XP
> sp2 and have quite good vba skills.
>
> TIA
> Chris
http://www.google.com/#hl=en&cp=20&gs_id=28&xhr=t&q=excel:compare+string&qe=ZXhjZWw6Y29tcGFyZSBzdHJpbmc&qesig=Icdx8BpMzItfq5HoXXeG7g&pkc=AFgZ2tkmaidcPyEw1keuqnBBFjiXFhVqcxMpxluJvOsBg-UMIOa5sJalg8cIJEkNDiZ1bJfk4gtXjUeU6vMLz_M9ee1f1a15_w&pf=p&sclient=psy&source=hp&pbx=1&oq=excel:compare+string&aq=f&aqi=&aql=&gs_sm=&gs_upl=&bav=on.2,or.r_gc.r_pw.&fp=80a7ff9ca756264&biw=888&bih=559

Could be easy or difficult depending on your text. Perhaps data>text
to columns to break up and then compare or something like this. If all
else fails you could do a for i= 1 to len(a1) to compare character by
character....

========http://dmcritchie.mvps.org/excel/strings.htm
String Comparisons, compare to second space   (based on posting
2003-01-090

Formulas include concatenation of two spaces to guarantee finding the
second space in each case.
a14:   BA 12345 10-30-2003 must be ---> BA 12345
B14:   NM 12345 AB 40893 Must be ----> NM 12345
D14"  =IF(UPPER(LEFT(A14 & "  ",FIND(" ",RIGHT(A14 & "  ",LEN(A14 & "
")
            -FIND(" ",A14 & "  ")))+FIND(" ",A14 & "  ")))=
          UPPER(LEFT(B14 & "  ",FIND(" ",RIGHT(B14 & "  ",LEN(B14 & "
")
            -FIND(" ",B14 & "  ")))+FIND(" ",B14 & "
"))),"Equal","Differs")

or  using a programmed User Defined Function

A14:  BA 12345 x
B14:  BA 1234
C14:  ba 12345
D14: =CompareTruncate(A14,B14)  -- shows Differs
E14: =CompareTruncate(A14,C14)  -- Equal

Function CompareTruncate(ByVal string1 As String, ByVal _
      String2 As String)
    string1 = Left(string1 & "  ", InStr(InStr(string1 & "  ", " ") +
1, _
        string1 & "  ", " "))
    String2 = Left(String2 & "  ", InStr(InStr(String2 & "  ", " ") +
1, _
        String2 & "  ", " "))
    '-- CompareTruncate = UCase(string1) = UCase(String2)--replaced
by...
    CompareTruncate = InStr(1, String2, string1, vbTextCompare) = 1
End Function

Thanks Don, I'll need to study that.  The vba avenue is the one that I wish 
to follow as it will be part of a very much more substantial piece of code.

Chris 


0
ng4206 (77)
8/24/2011 1:36:35 PM
"Ron Rosenfeld" <ron@nospam.net> wrote in message
news:5es95714gji7lhn9o5uir8t2e4fbrh9q4m@4ax.com...
> On Wed, 24 Aug 2011 08:18:59 +0100, "Chris Watts" <ng@ctwatts.plus.com>
> wrote:
>
>>I have a problem with comparing two strings, string1 and string2.  string2
>>will be a manually edited version of string1 so will have had
>>words/punctuation added/deleted and characters changed to/from Caps.
>>
>>Comparing the two strings (in vba, Excel 2007) to find if they are
>>identical
>>(case sensitive) is not a problem as I can use strcompar(). but I wish to
>>locate where the differences occur.  Detecting the first one would help
>>but
>>it would be nice to continue and find where they now become identical
>>again.
>>
>>Any suggestion would be appreciated.  I am using Excel 2007 under Windows
>>XP
>>sp2 and have quite good vba skills.
>>
>>TIA
>>Chris
>>
>>
>
> Chris,
>
> Please provide some examples of your inputs and desired outputs.
>
> One thought that comes to mind is that you could do a character by
> character comparison, building up a binary value, and work from that.
>
Sort of thing that I have in mind is:

String1  =  "Now is the time for all good men to to come to the aid of the 
part.."
String2  =  "NOW is the time for all good persons to come to the aid of the 
local party."

I wish to flag up in String1 that NOW and part/y are changes; persons as a
substitution, local as an addition and to as a deletion.

String1 may also be interspersed with tags eg <bold> and </bold> to indicate
formatting  but not in String2 and need to be ignored.


I guess this is a bit like the Word change tracking process but I need it in 
Excel.  I guess I could instantiate a Word object and operate on that but 
previous attempts with usingthat technique have worked but left a trail of 
unclosed Word files - even though I specifically killed the object - and it 
was very very slow.  The latter point is significant as I may have several 
hundred strings to process.


cheers
Chris




0
ng4206 (77)
8/24/2011 1:42:14 PM
On Aug 24, 8:36=A0am, "Chris Watts" <n...@ctwatts.plus.com> wrote:
> "Don Guillett" <dguille...@gmail.com> wrote in message
>
> news:6b3e1d3d-52de-4c1b-8d70-85f757b48523@s12g2000yqm.googlegroups.com...
> On Aug 24, 2:18 am, "Chris Watts" <n...@ctwatts.plus.com> wrote:
>
>
>
> > I have a problem with comparing two strings, string1 and string2. strin=
g2
> > will be a manually edited version of string1 so will have had
> > words/punctuation added/deleted and characters changed to/from Caps.
>
> > Comparing the two strings (in vba, Excel 2007) to find if they are
> > identical
> > (case sensitive) is not a problem as I can use strcompar(). but I wish =
to
> > locate where the differences occur. Detecting the first one would help =
but
> > it would be nice to continue and find where they now become identical
> > again.
>
> > Any suggestion would be appreciated. I am using Excel 2007 under Window=
s
> > XP
> > sp2 and have quite good vba skills.
>
> > TIA
> > Chris
>
> http://www.google.com/#hl=3Den&cp=3D20&gs_id=3D28&xhr=3Dt&q=3Dexcel:compa=
re+str...
>
> Could be easy or difficult depending on your text. Perhaps data>text
> to columns to break up and then compare or something like this. If all
> else fails you could do a for i=3D 1 to len(a1) to compare character by
> character....
>
> =3D=3D=3D=3D=3D=3D=3D=3Dhttp://dmcritchie.mvps.org/excel/strings.htm
> String Comparisons, compare to second space =A0 (based on posting
> 2003-01-090
>
> Formulas include concatenation of two spaces to guarantee finding the
> second space in each case.
> a14: =A0 BA 12345 10-30-2003 must be ---> BA 12345
> B14: =A0 NM 12345 AB 40893 Must be ----> NM 12345
> D14" =A0=3DIF(UPPER(LEFT(A14 & " =A0",FIND(" ",RIGHT(A14 & " =A0",LEN(A14=
 & "
> ")
> =A0 =A0 =A0 =A0 =A0 =A0 -FIND(" ",A14 & " =A0")))+FIND(" ",A14 & " =A0"))=
)=3D
> =A0 =A0 =A0 =A0 =A0 UPPER(LEFT(B14 & " =A0",FIND(" ",RIGHT(B14 & " =A0",L=
EN(B14 & "
> ")
> =A0 =A0 =A0 =A0 =A0 =A0 -FIND(" ",B14 & " =A0")))+FIND(" ",B14 & "
> "))),"Equal","Differs")
>
> or =A0using a programmed User Defined Function
>
> A14: =A0BA 12345 x
> B14: =A0BA 1234
> C14: =A0ba 12345
> D14: =3DCompareTruncate(A14,B14) =A0-- shows Differs
> E14: =3DCompareTruncate(A14,C14) =A0-- Equal
>
> Function CompareTruncate(ByVal string1 As String, ByVal _
> =A0 =A0 =A0 String2 As String)
> =A0 =A0 string1 =3D Left(string1 & " =A0", InStr(InStr(string1 & " =A0", =
" ") +
> 1, _
> =A0 =A0 =A0 =A0 string1 & " =A0", " "))
> =A0 =A0 String2 =3D Left(String2 & " =A0", InStr(InStr(String2 & " =A0", =
" ") +
> 1, _
> =A0 =A0 =A0 =A0 String2 & " =A0", " "))
> =A0 =A0 '-- CompareTruncate =3D UCase(string1) =3D UCase(String2)--replac=
ed
> by...
> =A0 =A0 CompareTruncate =3D InStr(1, String2, string1, vbTextCompare) =3D=
 1
> End Function
>
> Thanks Don, I'll need to study that. =A0The vba avenue is the one that I =
wish
> to follow as it will be part of a very much more substantial piece of cod=
e.
>
> Chris- Hide quoted text -
>
> - Show quoted text -

I would think that the best way to do this would be to identify the
text if NOT the same and then MANUALLY correct.
0
dguillett11 (103)
8/24/2011 2:04:22 PM
"Don Guillett" <dguillett1@gmail.com> wrote in message 
news:17097810-7a75-4a5c-9d4b-200e58d5e797@g31g2000yqh.googlegroups.com...
On Aug 24, 8:36 am, "Chris Watts" <n...@ctwatts.plus.com> wrote:
> "Don Guillett" <dguille...@gmail.com> wrote in message
>
> news:6b3e1d3d-52de-4c1b-8d70-85f757b48523@s12g2000yqm.googlegroups.com...
> On Aug 24, 2:18 am, "Chris Watts" <n...@ctwatts.plus.com> wrote:
>
>
>
> > I have a problem with comparing two strings, string1 and string2. 
> > string2
> > will be a manually edited version of string1 so will have had
> > words/punctuation added/deleted and characters changed to/from Caps.
>
> > Comparing the two strings (in vba, Excel 2007) to find if they are
> > identical
> > (case sensitive) is not a problem as I can use strcompar(). but I wish 
> > to
> > locate where the differences occur. Detecting the first one would help 
> > but
> > it would be nice to continue and find where they now become identical
> > again.
>
> > Any suggestion would be appreciated. I am using Excel 2007 under Windows
> > XP
> > sp2 and have quite good vba skills.
>
> > TIA
> > Chris
>
> http://www.google.com/#hl=en&cp=20&gs_id=28&xhr=t&q=excel:compare+str...
>
> Could be easy or difficult depending on your text. Perhaps data>text
> to columns to break up and then compare or something like this. If all
> else fails you could do a for i= 1 to len(a1) to compare character by
> character....
>
> ========http://dmcritchie.mvps.org/excel/strings.htm
> String Comparisons, compare to second space (based on posting
> 2003-01-090
>
> Formulas include concatenation of two spaces to guarantee finding the
> second space in each case.
> a14: BA 12345 10-30-2003 must be ---> BA 12345
> B14: NM 12345 AB 40893 Must be ----> NM 12345
> D14" =IF(UPPER(LEFT(A14 & " ",FIND(" ",RIGHT(A14 & " ",LEN(A14 & "
> ")
> -FIND(" ",A14 & " ")))+FIND(" ",A14 & " ")))=
> UPPER(LEFT(B14 & " ",FIND(" ",RIGHT(B14 & " ",LEN(B14 & "
> ")
> -FIND(" ",B14 & " ")))+FIND(" ",B14 & "
> "))),"Equal","Differs")
>
> or using a programmed User Defined Function
>
> A14: BA 12345 x
> B14: BA 1234
> C14: ba 12345
> D14: =CompareTruncate(A14,B14) -- shows Differs
> E14: =CompareTruncate(A14,C14) -- Equal
>
> Function CompareTruncate(ByVal string1 As String, ByVal _
> String2 As String)
> string1 = Left(string1 & " ", InStr(InStr(string1 & " ", " ") +
> 1, _
> string1 & " ", " "))
> String2 = Left(String2 & " ", InStr(InStr(String2 & " ", " ") +
> 1, _
> String2 & " ", " "))
> '-- CompareTruncate = UCase(string1) = UCase(String2)--replaced
> by...
> CompareTruncate = InStr(1, String2, string1, vbTextCompare) = 1
> End Function
>
> Thanks Don, I'll need to study that. The vba avenue is the one that I wish
> to follow as it will be part of a very much more substantial piece of 
> code.
>
> Chris- Hide quoted text -
>
> - Show quoted text -

I would think that the best way to do this would be to identify the
text if NOT the same and then MANUALLY correct.

I am not looking to make manual corrections but to flag the position of the 
difference for manual correction
When you have several thousand cases (strings) where there are differences 
it would be highly beneficial to try and flag the site of the difference 
when the text string is likely to be several hundred characters long! 


0
ng4206 (77)
8/24/2011 2:34:21 PM
In article <NaKdnWf7Tt9wOMnTnZ2dnUVZ8kOdnZ2d@bt.com>,
 "Chris Watts" <ng@ctwatts.plus.com> wrote:

> I have a problem with comparing two strings, string1 and string2.  string2 
> will be a manually edited version of string1 so will have had 
> words/punctuation added/deleted and characters changed to/from Caps.
> 
> Comparing the two strings (in vba, Excel 2007) to find if they are identical 
> (case sensitive) is not a problem as I can use strcompar(). but I wish to 
> locate where the differences occur.  Detecting the first one would help but 
> it would be nice to continue and find where they now become identical again.
> 
> Any suggestion would be appreciated.  I am using Excel 2007 under Windows XP 
> sp2 and have quite good vba skills.
> 
> TIA
> Chris

I was hoping that responders would provide a simple solution. That was 
wishful thinking.

In your formulation of the problem you wrote, "...it would be nice to 
continue and find where they now become identical again." The problem 
lies in the definition of "become identical again." For example, where 
does "I want to interpret your body language" become identical again 
with "I want to read your book report"?

-- 

Sam

Conservatives are against Darwinism but for natural selection.
Liberals are for Darwinism but totally against any selection.
0
SalmonEgg (56)
8/24/2011 4:10:42 PM
Reply:

Similar Artilces:

vb.net conection string to C# -- problem
Here is the oledb connection string which works fine in VB.Net connOle.ConnectionString = _ & "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=C:\;Extended " _ & "Properties=""text;"HDR=Yes;FMT=TabDelimited""" I am having problems with the doublde quotes inside the string ..."Properties = ""...""" part. Here is what I tried that is not working: connOle.ConnectionString = + "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=C:\\;" + "Extended Propert...

Pivot table using different worksheets/same workbook
I need to know if there is a way to create one Pivot Table for multiple sheets in a workbook. For example, I have separate sheets for each month for a sales report and would like the Pivot Table to show the totals for the entire year. You can create a pivot table from data on separate sheets (multiple consolidation ranges), but the results may not be exactly what you want. There's more information here: http://www.contextures.com/xlPivot08.html Mellie wrote: > I need to know if there is a way to create one Pivot Table for multiple > sheets in a workbook. For example, I ...

How do I change default file location for Publoisher 2007?
MS Publisher does not seem to have an easy way for changing default file locations for saving work. If anyone has figured out how to do this, please share your secrete with the rest of us. Sincerely eephraim You can create a folder, when you *save as* look for the tools menu on the upper right, add this folder to *My Places*. You can use Favorite Links in Vista. It will be an extra click. -- Mary Sauer http://msauer.mvps.org/ "eephraim" <eephraim@discussions.microsoft.com> wrote in message news:CE9FEDCA-CDE1-4BF8-9873-AF7C8937ED24@microsoft.com... > MS Publisher do...

EditControl Append String
I am using the following code to append a string to the EditControl. 1. CString strBuffer = ""; 2. GetWindowText (strBuffer); 3. if (!strBuffer.IsEmpty()) 4. strBuffer += "\r\n"; 5. strBuffer += str; 6. SetWindowText(strBuffer); 7. LineScroll (GetLineCount(), 0); The code compiles fine but I get an error message when execution reaches line 6. The Message is : "An invalid argument was encountered". Why am I getting this message? Thanks. Jess Is there more code involved. That message often comes from a DDX or DDV statement that is using a control ID that ...

Different outcome of adding ribbon via xml instead of in a table
Hi, I am just trying to understand why when I have a table in my database called Ribbons and run the following code at startup (via autoexec) the ribbon is gone, which is good Public Function LoadRibbons() Dim RS As Recordset Set RS = CurrentProject.Connection.Execute("SELECT Ribbons.RibbonName, Ribbons.RibbonXML FROM RIBBONS") If Not RS.BOF Then Application.LoadCustomUI RS("RibbonName").Value, RS("RibbonXml").Value End If RS.Close Set RS = Nothing End Function but if i dont want to store the xml in a table where a clever person might change it but want it i...

Error:A global catalog cannot be located
When I click on the members tab of the a group property with administrative tool on my PC. I've got error for "A global catalog cannot be located to retrieve the icons for the member list. Some icon may not be shown." Our domain (windows 2000 server) have one DC which holds GC too. I find after some while, I try the function again. It works. Any hint for the problem? Hello TC, Is the DC also DNS server and are the clients configured to use only this on the NIC as DNS server? Please post an uneditd ipconfig /all from the server and the client with th...

String of numbers
Hi, I have a problem to make a string of numbers. What I'm trying to do is following. Ex. 1 Cell A1 45-0001 Cell B1 5975 The result I want in Cell C1: 450001005975 I'l be wery grateful for some help! -- Best regards Mia You can start with this =replace(A1,"-","") & text(B1,"000000") -- HTH, Barb Reinhardt "Mia" wrote: > Hi, > > I have a problem to make a string of numbers. What I'm trying to do is > following. > > Ex. 1 > Cell A1 > 45-0001 > Cell B1 > 5...

text-to-speech with different languages
Hello! Is there a way to use the integrated text-to-speech feature in excel with tts engines other than English engines? I already have some tts engines with different languages (from lernout & hauspie) installed, but they are not selectable on the text-to-speech tab in the speech item located in the control panel. Thanks in advance, Peter ...

how to add pages with different orientations
I am making a publication in which I need some pages to be in a portrait orientation and others in landscape. How can I do this? On Mon, 20 Feb 2006 01:14:26 +0000, Ebony wrote (in article <C7935245-3680-4BE4-BAE5-2B714ED5AD1B@microsoft.com>): > I am making a publication in which I need some pages to be in a portrait > orientation and others in landscape. How can I do this? Ah another pathologically lazy fuckwit who cannot be arsed to STFW before posting. Just by posting this you have proved that you cannot be bothered. This question has been asked - and answered - a...

Cost basis in different currencies
I am using Money 2004 Deluxe and I am using Danish Krone (DKK) as my base currenc In my investment portfolio I have investments in varios currencies (DKK, USD, EURO, etc.). For all investments in currencies other than DKK I have a problem with the calculation of the cost basis on thereby also the gain. For instance an investment shown in its original currency such as USD with a historical cost of USD 100 will now show a cost basis of USD 103. I suspect it has something to do with exchange rate conversion back and forth with my base currency (DKK) when I update Money(?). However the historical...

How I can combine cells of different pages?
I mean how can I add, divide, mutliply, and so on figures of different cells for example, add a figure of the cell f4 of the page 1 with the cell g5 of the page 2. When you say page 1 & page 2 I assume you mean sheet 1 & sheet 2. You can apply mathematic functions for a cell using different sheets but you have to name the source i.e. =A1+Sheet2!A1. An easy way to do this is begin your formula on sheet 1 = A1+ and then go to the cell in the sheet where it resides, click on the cell and click on your active sheet. Excel will automatically place the name reference of the cell...

Comparing a variant string with char*
I am trying to compare a variant string with a char* constant. The code compiles on VS2002, but VS2005 gives the following compilation error, Error 1 error C2678: binary '==' : no operator found which takes a left-hand operand of type '_variant_t' (or there is no acceptable conversion) c:\documents and settings\projects\test\test\test.cpp 25 The code is as follows, static _variant_t _getVARIANTTfromRs(); int _tmain(int argc, _TCHAR* argv[]) { if(_getVARIANTT() == "Y") { printf("Inside if\n"); } else { printf("Inside else\n"); } retu...

c1041724 restoring on different server
Hello I am trying to restore the exchange server to another box, ive tried replaying the logs and even eseutil /p /i or just /p but the same error, i am running exch 2000 enterprise, an upgrade from sbs. the store wont mount. I have support for chinese and other languages on both the production server and the restore server. I tried restoring AD on this machine but exchange complains about not been the schema master. The ad on this machine has no accounts, i figure after reparing the database i can map the mailboxes but now luck for a few days. Any recommendations apreciated. thanks I got it...

tools>options> cannot change file locations
Hi, I recently moved to a new computer. I transferred my MS Office settings from the old computer to the new one. I had set the Autorecover save location for an excel file on a different partition on the old PC. The file opens fine on the new computer but under Tools>Options> when I try clicking on any of the tabs, I get an error message that the partition cannot be found! So everytime it tries to save an autorecover version, it cannot and gives an error message, and does not allow me to change the location! I was wondering if there was another way to change the location of the ...

How can I put two variables with different scales on the same char
Plot both series together in the chart, double click on one series, and on the Axis tab, choose Secondary. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services - Tutorials and Custom Solutions - http://PeltierTech.com/ 2006 Excel User Conference, 19-21 April, Atlantic City, NJ http://peltiertech.com/Excel/ExcelUserConf06.html _______ "Candace" <Candace@discussions.microsoft.com> wrote in message news:40078D0A-0639-4721-AFD6-BE55326BCE93@microsoft.com... > ...

overlay two time series with different data amount in chart
I have the stock quotes of two different companies. Of stock A I have daily data and of stock B I only have weekly data. I'd like to overlay the two companies' stock quotes in a diagram. How do I have to configure excel for that it stretches the quote for the company for which I only have weekly data? any help is appreciated? Nicolas Nicolas, This might be a little klutzy, but see if it works for you. Make a copy of each company's data: For Company A: Jan 1 200 Jan 2 201 Jan 3 200 Jan 4 199 For Company B: Jan 1 222 Jan 8 233 Jan 15 232 J...

MFC-App on W2K and NT
hi! i have an application running under W2K/XP and NT. while it behaves normally with W2K and XP the app claims 100% of CPU-usage under NT though no activity is forced by the user - just after starting the app the CPU-usage increases to 100%... any ideas? thanks, philipp ...

Different footer on same worksheet
Is there a way to create different footers on different pages of the SAME worksheet, or do you have to put the information into seperate worksheets and create seperate footers for each? Hi Christina You need a macro to do this http://www.rondebruin.nl/print.htm#Header -- Regards Ron de Bruin http://www.rondebruin.nl "Christina" <anonymous@discussions.microsoft.com> wrote in message news:22d301c418db$6f004690$3501280a@phx.gbl... > Is there a way to create different footers on different > pages of the SAME worksheet, or do you have to put the > information into...

Message Input with link to different work sheet
Hi, What I would like to do, is create a link from a 'hint' (or an error message) to another worksheet that appears when the user focuses on the particular cell or gets an error message. How do I create a link (or can I) through the Message Input dialouge under Data > Validation?? More specifically, I am creating a workbook that contains different hardware and software that is assigned to different people. I have one worksheet titled 'Lists' and there, I am adding all the items that will be inventoried or tracked. So, on the 'Lists' worksheet, there is a c...

How to add records to a subform from a listbox on a different form
Hi Guys, This is driving me insane..... Normally one would select products on an orders form from within a subform that is linked to OrderDetails, this subform being linked via its PK to the main form based upon Orders (say). I have way too many products, of too complex a nature to select in this way. So I have built a search form which shows the results of a search in a listbox - which includes the products PK. Now, how do i add the selected item in the listbox to an 'orderDetails' subform? It appears simple - a matter of referencing a subform - but it's not! Can a...

What's the different for PNPDTest between WLK 1.5 and WLK 1.2
I am working on Windows Para-virtual driver for Xen virtualization platform. There is a bus driver enumerate child disk and network device. A SCSI miniport and NDIS miniport driver are used to service these disk and network devices. There days I use WLK 1.5 to run 'unclassified' signature test for my bus driver. Find that 'Plug and Play Driver Test' cannot pass in WLK 1.5 which was passed in WLK 1.2. 'Run Surprise PNPD Test' was failed with error message 'Run Surprise PNPD Test' does not exist. CPK file told me that 'Surprise PNPD Test' ...

help please with creating a Query with different
Hello: I have a database of resources to use with clients with depression, anxiety, stress etc. I have the symptons (depression anxiety etc) as yes / no fields. I want to make a query where you can enter the sympton e.g. depression and the query provides a list of only those resources where the depression box is yes. I tried putting [enter sympton] in the field of the query and 'yes' in the criteria but that lists all the resources. Can someone tell me where I am going wrong. Thank you. On 27 feb, 07:40, Helping People Ros <Helping People R...@discussions.microsoft.co...

Recipient policy
Ok, we began with (SEE Exchange 2k3 in Child domain - Best Practices) a parent domain AM.com and childe VA.AM.com. I need to build a Recipient Policy that makes different default Email addresses. the Parent domain needs %First.Last%@AM.com and the Child domain's users need to have %FirstInitial.LastName%@VDA-SYSTEMS.COM but don't necessarily need both. what do you think?? DJK Can create RP for child domain based on upn suffix (if you don't change the default for child domain accounts, it should be @childdomain.parentdomain.com). Or you could add a new UPN suffix for chi...

how do I convert text string into a cell reference
I have a spreadsheet with multiple pages (a summary sheet, plus multiple single sheets with common format data for different products). In the summary sheet, I want to keep the cell reference the same, but change the page reference according to the column that the data is in. That way I can change a cell at the top of the column to pull up the right data. I can create the cell reference OK in text form using Concatenate , but cannot see how to convert the resultant text string to get back to the real data. Any ideas ?? You can use the Indirect function to return a reference. For exampl...

CRM 4.0 new deployment datbase file locations ????
Hi When you deploy a new organization it seems that CRM tries to place the database and log files in the same location as when first installed. The problem is that we have moved log files to new disks on another drive and when creating a new organization it tries to create the log file on the old location even if we have changed the default location paths on the SQL server. Does CRM store a path for new databases/logfiles somewhere or how is this working ? The problem is that the organisations couldn't be created before we made a directory on the old location and then we had to m...