Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am using vb.net to populate an excel sheet fine...

But when using:

.ActiveCell.FormulaR1C1 = "=MIN(C" & intFirstYellow & ":C" & intLastYellow & ")"

 

to place a formula i.e. =MIN(C5:C7)

 

does not work accurately, it place =MIN($E:$F) instead.

 

Can you see why?

Thanks

Farshad
Posted

Is intFirstYellow an integer? if so you are trying to combine an integer with a string.

Try .ActiveCell.FormulaR1C1 = "=MIN(C" & str(intFirstYellow) & ":C" & str(intLastYellow) & ")"

Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi
Posted

Use native .Net rather than the compadibility functions:

.ActiveCell.FormulaR1C1 = "=MIN(C" & intFirstYellow.ToString & ":C" & intLastYellow.ToString & ")"

Native functions are supposed to be faster than the compatiblility ones

.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...