View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Bundy John Bundy is offline
external usenet poster
 
Posts: 772
Default Using A Function in a Macro

You just pass in the cell value, so if you were doing rows 1-10 for example
it would be:
For i = 1 to 10
sheet1.cells(i,1)=BigBookingNumber(sheet1.cells(i, 1)
Next

not tested but this should be all you need. Depending on where you store the
Function you may need to make it a Public function or move it to the current
workbook.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Jai_Friday" wrote:

Good Afternoon All,

I have a function built that takes a character based coded cell value and
reformats into a number with a formula.

The function works fine manually using it example =BigBookingNumber(cell
value)

However is it easy to create a macro that read sa specific column and runs
the function where there is a value (And also replace the original value)

So in a sense it take each value and puts =BigBookingNumber() around it

Thanks in Advance

Jai