Formula outputting incorrectly?

kpark91

Well-known Member
Joined
Jul 15, 2010
Messages
1,582
Hi, I've tried to post a formula in Excel Questions forum (without the spaces)

=SUMPRODUCT((M2:M10 < NOW()) * (M2:M10 <> "") * (N2:N10 <> "Completed"))

but it displayed as a totally different formula.

Any reason why?
 
Using code tags often does not solve that problem any more, but inserting a space after the < or > should (Should be no need for a space before the < or >).
 
Using code tags often does not solve that problem any more
Works for me about 99% of the time. I think I can only recall once that it didn't.
 
Works for me about 99% of the time. I think I can only recall once that it didn't.
I definitely don't have as good a success rate as that. Perhaps I don't hold my mouth correctly when posting. :biggrin:
 
I wonder if it has anything to do with individual profile settings.
Not sure, I don't really mess around with mine...
 
My last post may have been misleading.

The majority of times I post a formula with < and no following space, the formula dispalys correctly anyway. However, if it doesn't then using code tags also doesn't seem to usually help. So the code tags success rate for me is poor if the standard method didn't work. If the standard method worked, my success rate with code tags is either 0% or 100% because I don't use code tags then. ;)

In terms of why a formula would sometimes display correcly and sometimes not, schielrn made some interestion observations in post #17 of this thread.
 
Hi there has been another occasion where the code was 'broken' when posted.
I'm guessing it has to do with the forum XML or whatever they're using.

Take a look:
http://www.mrexcel.com/forum/showthread.php?t=570660&page=4

I've tried posting
Code:
Option Base 0
Option Explicit
Sub GetCIK()
    Dim X As Long, LastRow1 As Long, OutputRow1 As Long, CellContent As String, LastRow&
    Dim pos1&, pos2&, OutputRow2&
    
    Const StartRow As Long = 1
    Const DataCol As String = "A"
    Const OutputSheet As String = "URLs"
    Const OutputCol1 As String = "B"
    Const OutputCol2 As String = "C"
    
    LastRow = Sheets("wquery").Cells(Rows.Count, DataCol).End(xlUp).Row
    OutputRow1 = Worksheets(OutputSheet).Cells(Rows.Count, OutputCol1).End(xlUp).Row
    OutputRow2 = Worksheets(OutputSheet).Cells(Rows.Count, OutputCol2).End(xlUp).Row
    
    For X = StartRow To LastRow
        If Sheets("wquery").Cells(X, DataCol).Value Like "*getcompany*CIK*" Then
          OutputRow1 = OutputRow1 + 1
          CellContent = Sheets("wquery").Cells(X, DataCol).Value
          Worksheets(OutputSheet).Cells(OutputRow1, OutputCol1).Value = Left$(Split(CellContent, ";")(1), 14)
        End If
        
        If Sheets("wquery").Cells(X, DataCol).Value Like "*""nowrap*</td>" Then
            OutputRow2 = OutputRow2 + 1
            CellContent = Sheets("wquery").Cells(X, DataCol).Value
            pos1 = InStr(1, CellContent, """nowrap""")
            pos2 = InStr(1, CellContent, "</td>")
            Worksheets(OutputSheet).Cells(OutputRow2, OutputCol2).Value = Mid(CellContent, pos1 + 9, pos2 - pos1 - 9)
        End If
    Next X
    
End Sub


Using code tags often does not solve that problem any more, but inserting a space after the < or > should (Should be no need for a space before the < or >).
It seems like Peter was right xD but in my case, I could not use spaces.. except I could concatenate the strings with ;amp (&).
 

Forum statistics

Threads
1,224,557
Messages
6,179,508
Members
452,918
Latest member
Davion615

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top