Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Variable in arguments

Hi there,

I would like to know how to add variable to arguments. E.g.: If I want to
write the formula =min(A10:B25), but instead of writing fixed cells, I would
like somthing like =min(A10:B"X+20"), where I can set any value to X. In this
case, if I set X=10, I would like to know the minimun between A20 and B30
(that is 10 + 20).

Thanks.
Mario
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 367
Default Variable in arguments

On Nov 16, 9:01 am, Mario wrote:
Hi there,

I would like to know how to add variable to arguments. E.g.: If I want to
write the formula =min(A10:B25), but instead of writing fixed cells, I would
like somthing like =min(A10:B"X+20"), where I can set any value to X. In this
case, if I set X=10, I would like to know the minimun between A20 and B30
(that is 10 + 20).

Thanks.
Mario


What you need is the indirect function:

=min(indirect("A10:B" & X+ 20)

hth

Carlo
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Variable in arguments

If you wanted to put your value in cell e1
=MIN(INDIRECT("A10:B"&E1))
or
=MIN(INDIRECT("A10:B"&E1+20))
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mario" wrote in message
...
Hi there,

I would like to know how to add variable to arguments. E.g.: If I want to
write the formula =min(A10:B25), but instead of writing fixed cells, I
would
like somthing like =min(A10:B"X+20"), where I can set any value to X. In
this
case, if I set X=10, I would like to know the minimun between A20 and B30
(that is 10 + 20).

Thanks.
Mario


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Variable in arguments

Cool. This is what I wanted. Many thanks. :-)

"Don Guillett" wrote:

If you wanted to put your value in cell e1
=MIN(INDIRECT("A10:B"&E1))
or
=MIN(INDIRECT("A10:B"&E1+20))
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mario" wrote in message
...
Hi there,

I would like to know how to add variable to arguments. E.g.: If I want to
write the formula =min(A10:B25), but instead of writing fixed cells, I
would
like somthing like =min(A10:B"X+20"), where I can set any value to X. In
this
case, if I set X=10, I would like to know the minimun between A20 and B30
(that is 10 + 20).

Thanks.
Mario



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
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
Passing Variable Number of Arguments to a Sub blatham Excel Discussion (Misc queries) 4 December 10th 05 10:36 AM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
object variable or with block variable not set Diego Excel Discussion (Misc queries) 1 August 9th 05 02:46 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM


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