#1   Report Post  
SB
 
Posts: n/a
Default Formula in VBasic

Hello,

I have following problem; with help of a macro I want to copy a formula in
different cells. The formula is
ActiveCell.FormulaR1C1 = "=MATCH(RC[-21],Comments!C[-21],FALSE)"
The formula starts in cell V22 and finds the Vlookup value in cell A22. When
I copy the formula down, the row number will be adjusted. But when I copy
same formula to cell W22, it refers to value B22. How can I fix the formula
in Vbasic, to look at always the same column and only adjust the row numbers?

thanks in advance for your help!

regards
SB

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Is this what you want?

ActiveCell.FormulaR1C1 = "=MATCH(RC1,Comments!C1,FALSE)"


--
HTH

Bob Phillips

"SB" wrote in message
...
Hello,

I have following problem; with help of a macro I want to copy a formula in
different cells. The formula is
ActiveCell.FormulaR1C1 = "=MATCH(RC[-21],Comments!C[-21],FALSE)"
The formula starts in cell V22 and finds the Vlookup value in cell A22.

When
I copy the formula down, the row number will be adjusted. But when I copy
same formula to cell W22, it refers to value B22. How can I fix the

formula
in Vbasic, to look at always the same column and only adjust the row

numbers?

thanks in advance for your help!

regards
SB



  #3   Report Post  
SB
 
Posts: n/a
Default

Hi Bob,

yes, thanks! That was really simple, but exactly what I needed ;-)

regards
SB

"Bob Phillips" wrote:

Is this what you want?

ActiveCell.FormulaR1C1 = "=MATCH(RC1,Comments!C1,FALSE)"


--
HTH

Bob Phillips

"SB" wrote in message
...
Hello,

I have following problem; with help of a macro I want to copy a formula in
different cells. The formula is
ActiveCell.FormulaR1C1 = "=MATCH(RC[-21],Comments!C[-21],FALSE)"
The formula starts in cell V22 and finds the Vlookup value in cell A22.

When
I copy the formula down, the row number will be adjusted. But when I copy
same formula to cell W22, it refers to value B22. How can I fix the

formula
in Vbasic, to look at always the same column and only adjust the row

numbers?

thanks in advance for your help!

regards
SB




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Pleasure mate.

--
HTH

Bob Phillips

"SB" wrote in message
...
Hi Bob,

yes, thanks! That was really simple, but exactly what I needed ;-)

regards
SB

"Bob Phillips" wrote:

Is this what you want?

ActiveCell.FormulaR1C1 = "=MATCH(RC1,Comments!C1,FALSE)"


--
HTH

Bob Phillips

"SB" wrote in message
...
Hello,

I have following problem; with help of a macro I want to copy a

formula in
different cells. The formula is
ActiveCell.FormulaR1C1 = "=MATCH(RC[-21],Comments!C[-21],FALSE)"
The formula starts in cell V22 and finds the Vlookup value in cell

A22.
When
I copy the formula down, the row number will be adjusted. But when I

copy
same formula to cell W22, it refers to value B22. How can I fix the

formula
in Vbasic, to look at always the same column and only adjust the row

numbers?

thanks in advance for your help!

regards
SB






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
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Simplify formula Luke Excel Worksheet Functions 37 May 6th 05 07:21 AM
put formula results into a different cell if it is empty PutFormula Excel Worksheet Functions 2 February 11th 05 03:31 AM
how do i write a formula and keep in in formula form, so it DOESN. norcalchick2207 Excel Discussion (Misc queries) 2 February 4th 05 08:38 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 01:10 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"