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 workout the formula from many column..

ActiveCell.FormulaR1C1 =
"=IF(COUNTIF([ITEM.XLS]SHEET1!C[-11],RC[-6]),VLOOKUP(RC[-6],[ITEM.XLS]SHEET1!C[-11]:C[-1],11,0),0)"

How I can give the varibale for RC[-6] in the above formula. Because it
might not be the column before 6 in all the time. For example if I insert a
new column and that forumula should be worked out from the new column . So
please help to rewrite the forumula to workout from any column

With thanks
Pol

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default to workout the formula from many column..

Well, you'll need someway to define your variable (how do we know which
column to use?), but once you figure that out:

xColumn = -6
ActiveCell.FormulaR1C1 =
"=IF(COUNTIF([ITEM.XLS]SHEET1!C[-11],RC[" & xColumn & "]),VLOOKUP(RC[" &
xColumn & "],[ITEM.XLS]SHEET1!C[-11]:C[-1],11,0),0)"

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"pol" wrote:

ActiveCell.FormulaR1C1 =
"=IF(COUNTIF([ITEM.XLS]SHEET1!C[-11],RC[-6]),VLOOKUP(RC[-6],[ITEM.XLS]SHEET1!C[-11]:C[-1],11,0),0)"

How I can give the varibale for RC[-6] in the above formula. Because it
might not be the column before 6 in all the time. For example if I insert a
new column and that forumula should be worked out from the new column . So
please help to rewrite the forumula to workout from any column

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
highest # in a column A & returns answer from column B Formula Randy Excel Discussion (Misc queries) 6 October 30th 07 10:17 PM
Trying to Create a Excel Spreadsheet that will tabulate workout ti karriker Excel Discussion (Misc queries) 2 October 16th 07 03:36 AM
How do you set up a workout log? birdhawg New Users to Excel 1 May 31st 07 04:10 AM
formula to workout equal to or greater than wheelie Excel Worksheet Functions 1 April 1st 06 01:09 PM
Excel sheet for workout jogging time and graph Trevor New Users to Excel 1 March 7th 05 03:54 PM


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