Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Simple Questions

Is it possible to write a routine in certain programming language and
direct excell to run the routine and then place the result into a cell
in EXCEL?

Thanks

James

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Simple Questions

James,

Is the routine to be in the Excel workbook. If so, it is as simple as

'your code here to calculate a variable myResult
Range("A1").Value = myResult

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"James" wrote in message
...
Is it possible to write a routine in certain programming language and
direct excell to run the routine and then place the result into a cell
in EXCEL?

Thanks

James



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Simple Questions

Actually I


I don't have any trouble calculating single variables,

A typical routine that I write would be a loop that given 10 numbers
in sequence, if the most recent value is = 7 of the ten preceeding
numbers then the routine would return a value of 7 or if = 4 of the
preceeding numbers would return a balueb of 4 and so on.

Right now what I have to do is save a column of numbers as a text
file, then run the text file though a qbasic routine and then paste
the results back into EXCEL. This works but it is time consuming.

I have never graduated out of qbasic because it has always been
adequete for the simple things I do with it.

James

"Bob Phillips" wrote in
:

James,

Is the routine to be in the Excel workbook. If so, it is as simple

as

'your code here to calculate a variable myResult
Range("A1").Value = myResult


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Simple Questions

You can use VBA in Excel to do this. In Excel, do Alt+F11 to get to the VBA
editor. In the Project window, make sure you workbook is selected (or
select it). then do Insert=Module

paste in code like this:

Sub Updatecount()
If Selection.Columns.Count 1 Then Exit Sub
icnt = 0
For i = 1 To Selection.Count - 1
If Selection(i) <= Selection( _
Selection.Count) Then _
icnt = icnt + 1
Next
Selection(Selection.Count, 2).Value = icnt
End Sub


Do Alt+F11 to go back to Excel.

Select 10 contiguous cells in a column with the column to the right blank.

do Tools=Macro=Macors and select Updatecount. Then hit run.

You should be able to do most things that you have done in qbasic, right in
Excel.

--
Regards,
Tom Ogilvy

James wrote in message
...
Actually I


I don't have any trouble calculating single variables,

A typical routine that I write would be a loop that given 10 numbers
in sequence, if the most recent value is = 7 of the ten preceeding
numbers then the routine would return a value of 7 or if = 4 of the
preceeding numbers would return a balueb of 4 and so on.

Right now what I have to do is save a column of numbers as a text
file, then run the text file though a qbasic routine and then paste
the results back into EXCEL. This works but it is time consuming.

I have never graduated out of qbasic because it has always been
adequete for the simple things I do with it.

James

"Bob Phillips" wrote in
:

James,

Is the routine to be in the Excel workbook. If so, it is as simple

as

'your code here to calculate a variable myResult
Range("A1").Value = myResult




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Formula Questions (I hope) Logues New Users to Excel 5 May 28th 09 05:36 AM
Charting - 2 questions simple scale and use of F11 SteveW New Users to Excel 2 July 3rd 06 02:47 PM
Questions should be simple please help babiigirl Excel Worksheet Functions 3 June 14th 06 07:24 PM
Several simple questions Stuart[_5_] Excel Programming 1 September 14th 03 08:58 PM
Simple VB and Excel questions Kevin Excel Programming 1 August 5th 03 08:40 PM


All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"