Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro writing formulas

Hi, so I'm having some issues writing a line in a macro that I'm
working on. I'm not sure why the below formula doesn't work:


ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
$1,""cols=7;rows=10"")"

which should get copied into the Excel sheet like this:

=BDS(A2&" equity",$I$1,"cols=7;rows=2")

Can anyone help me out here?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Macro writing formulas

hi
=bds???????
that is not a buit in function for 2003 and earlier nor is it part of the
analysis tool pack. is it an UDF? if so post your UDF code.

Regards
FSt1

" wrote:

Hi, so I'm having some issues writing a line in a macro that I'm
working on. I'm not sure why the below formula doesn't work:


ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
$1,""cols=7;rows=10"")"

which should get copied into the Excel sheet like this:

=BDS(A2&" equity",$I$1,"cols=7;rows=2")

Can anyone help me out here?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro writing formulas

Sorry, this is an outside function. If you're familiar with Bloomberg
at all, it's a bulk data function. I've seen a few posts where other
posters were bringing in custom functions as well. I essentially want
to bring in a variable target cell into the equation:

i.e.
=BDS(A2&" equity",$I$1,"cols=7;rows=2")
=BDS(A12&" equity",$I$1,"cols=7;rows=2")
=BDS(A(insert activerow's number here)&" equity",$I$1,"cols=7;rows=2")


On Feb 4, 10:22*am, FSt1 wrote:
hi
=bds???????
that is not a buit in function for 2003 and earlier nor is it part of the
analysis tool pack. is it an UDF? if so post your UDF code.

Regards
FSt1



" wrote:
Hi, so I'm having some issues writing a line in a macro that I'm
working on. I'm not sure why the below formula doesn't work:


ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
$1,""cols=7;rows=10"")"


which should get copied into the Excel sheet like this:


=BDS(A2&" equity",$I$1,"cols=7;rows=2")


Can anyone help me out here?- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro writing formulas

Dim myForm As String
ActiveCell.FormulaR1C1 _
= "=BDS(A" & ActiveCell.Row & "&"" equity"",$I$1,""cols=7;rows=2"")"

or

ActiveCell.FormulaR1C1 = "=bds(RC1&"" equity"",R1C9,""cols=7;rows=2"")

RC1 (same row, column 1)
R1C9 (row 1, column 9 = $i$9)

If you use A1 reference style, you use .formula
If you use R1C1 reference style, you use .formulaR1C1

But you don't want to mix A1 and R1C1 styles in your formula.

wrote:

Sorry, this is an outside function. If you're familiar with Bloomberg
at all, it's a bulk data function. I've seen a few posts where other
posters were bringing in custom functions as well. I essentially want
to bring in a variable target cell into the equation:

i.e.
=BDS(A2&" equity",$I$1,"cols=7;rows=2")
=BDS(A12&" equity",$I$1,"cols=7;rows=2")
=BDS(A(insert activerow's number here)&" equity",$I$1,"cols=7;rows=2")

On Feb 4, 10:22 am, FSt1 wrote:
hi
=bds???????
that is not a buit in function for 2003 and earlier nor is it part of the
analysis tool pack. is it an UDF? if so post your UDF code.

Regards
FSt1



" wrote:
Hi, so I'm having some issues writing a line in a macro that I'm
working on. I'm not sure why the below formula doesn't work:


ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
$1,""cols=7;rows=10"")"


which should get copied into the Excel sheet like this:


=BDS(A2&" equity",$I$1,"cols=7;rows=2")


Can anyone help me out here?- Hide quoted text -


- Show quoted text -


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Macro writing formulas

$I$1 is not a R1C1 reference

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


wrote in message ...
| Hi, so I'm having some issues writing a line in a macro that I'm
| working on. I'm not sure why the below formula doesn't work:
|
|
| ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
| $1,""cols=7;rows=10"")"
|
| which should get copied into the Excel sheet like this:
|
| =BDS(A2&" equity",$I$1,"cols=7;rows=2")
|
| Can anyone help me out here?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro writing formulas

Wow, thanks Niek! Would you know how I could anchor the $i$1 cell in
the R1C1 reference scheme? The row of the active cell that this
formula will go into will be constantly changing.

On Feb 4, 10:38*am, "Niek Otten" wrote:
$I$1 is not a R1C1 reference

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in ...

| Hi, so I'm having some issues writing a line in a macro that I'm
| working on. I'm not sure why the below formula doesn't work:
|
|
| ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
| $1,""cols=7;rows=10"")"
|
| which should get copied into the Excel sheet like this:
|
| =BDS(A2&" equity",$I$1,"cols=7;rows=2")
|
| Can anyone help me out here?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Macro writing formulas

R1C9

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in message ...
Wow, thanks Niek! Would you know how I could anchor the $i$1 cell in
the R1C1 reference scheme? The row of the active cell that this
formula will go into will be constantly changing.

On Feb 4, 10:38 am, "Niek Otten" wrote:
$I$1 is not a R1C1 reference

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in ...

| Hi, so I'm having some issues writing a line in a macro that I'm
| working on. I'm not sure why the below formula doesn't work:
|
|
| ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
| $1,""cols=7;rows=10"")"
|
| which should get copied into the Excel sheet like this:
|
| =BDS(A2&" equity",$I$1,"cols=7;rows=2")
|
| Can anyone help me out here?



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro writing formulas

Great! Thanks guys for all the help! Got it working!!!

On Feb 4, 10:51*am, "Niek Otten" wrote:
R1C9

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in ...

Wow, thanks Niek! Would you know how I could anchor the $i$1 cell in
the R1C1 reference scheme? The row of the active cell that this
formula will go into will be constantly changing.

On Feb 4, 10:38 am, "Niek Otten" wrote:



$I$1 is not a R1C1 reference


--
Kind regards,


Niek Otten
Microsoft MVP - Excel


wrote in ...


| Hi, so I'm having some issues writing a line in a macro that I'm
| working on. I'm not sure why the below formula doesn't work:
|
|
| ActiveCell.FormulaR1C1 = "=bds(RC[-8]&"" equity"",$i
| $1,""cols=7;rows=10"")"
|
| which should get copied into the Excel sheet like this:
|
| =BDS(A2&" equity",$I$1,"cols=7;rows=2")
|
| Can anyone help me out here?- Hide quoted text -


- Show quoted text -


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
writing formulas David Cheeks New Users to Excel 2 August 29th 08 12:00 AM
writing if formulas mafarmer Excel Worksheet Functions 1 December 5th 06 03:07 PM
Writing formulas ... Sige Excel Programming 5 July 27th 05 02:44 PM
Writing Formulas Irv Excel Worksheet Functions 2 December 28th 04 09:25 PM
Writing Array Formulas in VBA Ed Excel Programming 4 January 10th 04 07:27 PM


All times are GMT +1. The time now is 08:30 PM.

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

About Us

"It's about Microsoft Excel"