Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
pol pol is offline
external usenet poster
 
Posts: 129
Default to create a formula by removing RC[number]

I am using the following forumula in a macro.

ActiveCell.FormulaR1C1 =

"=IF(COUNTIF([item.xls]item!C[-11],RC[-6]),VLOOKUP(RC[-6],[item.xls]Item!C[-11]:C[-1],11,0),0)"
. Here RC[-6]) is G7 column. So I have to write the same formula to work
from any column which is active cell.
I wrote the same formula as follows to enable to work from any of the column

=IF(COUNTIF([item.xls]item!B:B,G7),VLOOKUP(G7,[item.xls]item!B:L,11,0),0).
But the G7 value will be shown as 'G7' so #item# error is showing ie the
formula is coming wrongly
=IF(COUNTIF([item.xls]item!B:B,'G7'),VLOOKUP('G7',[item.xls]item!B:L,11,0),0).

It would be very helpful if anybody can help to solve this problem

With thanks
Pol
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default to create a formula by removing RC[number]

Check your other post.

pol wrote:

I am using the following forumula in a macro.

ActiveCell.FormulaR1C1 =

"=IF(COUNTIF([item.xls]item!C[-11],RC[-6]),VLOOKUP(RC[-6],[item.xls]Item!C[-11]:C[-1],11,0),0)"
. Here RC[-6]) is G7 column. So I have to write the same formula to work
from any column which is active cell.
I wrote the same formula as follows to enable to work from any of the column

=IF(COUNTIF([item.xls]item!B:B,G7),VLOOKUP(G7,[item.xls]item!B:L,11,0),0).
But the G7 value will be shown as 'G7' so #item# error is showing ie the
formula is coming wrongly
=IF(COUNTIF([item.xls]item!B:B,'G7'),VLOOKUP('G7',[item.xls]item!B:L,11,0),0).

It would be very helpful if anybody can help to solve this problem

With thanks
Pol


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default to create a formula by removing RC[number]

The answer I gave you in your other post works for me

"pol" wrote:

I am using the following forumula in a macro.

ActiveCell.FormulaR1C1 =

"=IF(COUNTIF([item.xls]item!C[-11],RC[-6]),VLOOKUP(RC[-6],[item.xls]Item!C[-11]:C[-1],11,0),0)"
. Here RC[-6]) is G7 column. So I have to write the same formula to work
from any column which is active cell.
I wrote the same formula as follows to enable to work from any of the column

=IF(COUNTIF([item.xls]item!B:B,G7),VLOOKUP(G7,[item.xls]item!B:L,11,0),0).
But the G7 value will be shown as 'G7' so #item# error is showing ie the
formula is coming wrongly
=IF(COUNTIF([item.xls]item!B:B,'G7'),VLOOKUP('G7',[item.xls]item!B:L,11,0),0).

It would be very helpful if anybody can help to solve this problem

With thanks
Pol

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
How do I create a formula that gives number records with certain d apruett Excel Discussion (Misc queries) 3 July 8th 09 11:16 AM
create a formula that when I type a number in that cell it will to highland Excel Worksheet Functions 3 April 11th 08 01:06 AM
Create formula which will number a list in Excel 2003 Wessel Excel Discussion (Misc queries) 3 October 26th 06 10:29 AM
Need a formula to create an order number slorryy Excel Worksheet Functions 5 May 8th 06 01:41 AM
keep number when removing formula Cindy B Excel Discussion (Misc queries) 2 March 1st 06 06:30 PM


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