Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN CELL

example:
IF(OR(F3="BD",F3="CD"),B6,C6)

if cell "F3" is a certain value my formula requires different cell values,
this may occur numerous times in a formula, so I would like to have a shorter
way to say it.
"F3" has a limited (@4) different possibilities, but the "OR" combinations &
the goto's are quite numerous.
Thanks for any help!
Nick
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN CELL

possibly use a defined name with a formula to determine which cell to return.

this might be practical for a small number of formulas.

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

example:
IF(OR(F3="BD",F3="CD"),B6,C6)

if cell "F3" is a certain value my formula requires different cell values,
this may occur numerous times in a formula, so I would like to have a shorter
way to say it.
"F3" has a limited (@4) different possibilities, but the "OR" combinations &
the goto's are quite numerous.
Thanks for any help!
Nick

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN CELL


One way would be to use the =INDIRECT() and =VLOOKUP() functions. If yo
put the possibilities for F3s value in, for example, column G and th
address of the cell to relate that to in column H (i.e. to duplicat
your folrmula G1 = "BD", H1 = "B6", G2 = "CD", H2 = "C6") then use th
formula:

=INDIRECT(VLOOKUP(F3,G:H,2,0),TRUE)

The vlookup finds the value in F3 from the list in G and returns th
appropriate address from H, and the indirect takes that address an
returns the value. The formula will return #N/A if F3 isn't found i
G.

Hope this helps
Co

--
colofnatur
-----------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...fo&userid=3435
View this thread: http://www.excelforum.com/showthread.php?threadid=54472

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN C

tom,
could you give an example
Nick

"Tom Ogilvy" wrote:

possibly use a defined name with a formula to determine which cell to return.

this might be practical for a small number of formulas.

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

example:
IF(OR(F3="BD",F3="CD"),B6,C6)

if cell "F3" is a certain value my formula requires different cell values,
this may occur numerous times in a formula, so I would like to have a shorter
way to say it.
"F3" has a limited (@4) different possibilities, but the "OR" combinations &
the goto's are quite numerous.
Thanks for any help!
Nick

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN C

Insert=Name=Define

Name: MyCell

RefersTo:
=INDIRECT(IF(OR(Sheet1!$F$3="BD",Sheet1!$F$3="CD") ,"Sheet1!B6","sheet1!C6"))

then in your formula (for example)

=(21^mycell+mycell)/(3+rnd()*mycell)

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

tom,
could you give an example
Nick

"Tom Ogilvy" wrote:

possibly use a defined name with a formula to determine which cell to return.

this might be practical for a small number of formulas.

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

example:
IF(OR(F3="BD",F3="CD"),B6,C6)

if cell "F3" is a certain value my formula requires different cell values,
this may occur numerous times in a formula, so I would like to have a shorter
way to say it.
"F3" has a limited (@4) different possibilities, but the "OR" combinations &
the goto's are quite numerous.
Thanks for any help!
Nick



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN C

Tom & Col,
I'm not seeing how to apply this :(

my "IF"'s could be any combo i.e.
IF(OR(F3="BD",F3="CD"),B6,C6)
IF(OR(F3="BW",F3="CD"),H6,G6)
IF(OR(F3="BW",F3="CW"),B9,C1)
with various "then" and "else" responses
they are not in a "LOOKUP" format

sorry for being obtuse!!
Nick


"Tom Ogilvy" wrote:

Insert=Name=Define

Name: MyCell

RefersTo:
=INDIRECT(IF(OR(Sheet1!$F$3="BD",Sheet1!$F$3="CD") ,"Sheet1!B6","sheet1!C6"))

then in your formula (for example)

=(21^mycell+mycell)/(3+rnd()*mycell)

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

tom,
could you give an example
Nick

"Tom Ogilvy" wrote:

possibly use a defined name with a formula to determine which cell to return.

this might be practical for a small number of formulas.

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

example:
IF(OR(F3="BD",F3="CD"),B6,C6)

if cell "F3" is a certain value my formula requires different cell values,
this may occur numerous times in a formula, so I would like to have a shorter
way to say it.
"F3" has a limited (@4) different possibilities, but the "OR" combinations &
the goto's are quite numerous.
Thanks for any help!
Nick

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN C

If there are multiple random variations with no rhyme or reason, then I guess
you need to write them out.

--
regards,
Tom Ogilvy


"100pinesfarm" wrote:

Tom & Col,
I'm not seeing how to apply this :(

my "IF"'s could be any combo i.e.
IF(OR(F3="BD",F3="CD"),B6,C6)
IF(OR(F3="BW",F3="CD"),H6,G6)
IF(OR(F3="BW",F3="CW"),B9,C1)
with various "then" and "else" responses
they are not in a "LOOKUP" format

sorry for being obtuse!!
Nick


"Tom Ogilvy" wrote:

Insert=Name=Define

Name: MyCell

RefersTo:
=INDIRECT(IF(OR(Sheet1!$F$3="BD",Sheet1!$F$3="CD") ,"Sheet1!B6","sheet1!C6"))

then in your formula (for example)

=(21^mycell+mycell)/(3+rnd()*mycell)

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

tom,
could you give an example
Nick

"Tom Ogilvy" wrote:

possibly use a defined name with a formula to determine which cell to return.

this might be practical for a small number of formulas.

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

example:
IF(OR(F3="BD",F3="CD"),B6,C6)

if cell "F3" is a certain value my formula requires different cell values,
this may occur numerous times in a formula, so I would like to have a shorter
way to say it.
"F3" has a limited (@4) different possibilities, but the "OR" combinations &
the goto's are quite numerous.
Thanks for any help!
Nick

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default HOW DO I GO TO DIFFERENT CELLS BASED ON WHAT IS IN A CERTAIN C

thanks Tom
Nick

"Tom Ogilvy" wrote:

If there are multiple random variations with no rhyme or reason, then I guess
you need to write them out.

--
regards,
Tom Ogilvy


"100pinesfarm" wrote:

Tom & Col,
I'm not seeing how to apply this :(

my "IF"'s could be any combo i.e.
IF(OR(F3="BD",F3="CD"),B6,C6)
IF(OR(F3="BW",F3="CD"),H6,G6)
IF(OR(F3="BW",F3="CW"),B9,C1)
with various "then" and "else" responses
they are not in a "LOOKUP" format

sorry for being obtuse!!
Nick


"Tom Ogilvy" wrote:

Insert=Name=Define

Name: MyCell

RefersTo:
=INDIRECT(IF(OR(Sheet1!$F$3="BD",Sheet1!$F$3="CD") ,"Sheet1!B6","sheet1!C6"))

then in your formula (for example)

=(21^mycell+mycell)/(3+rnd()*mycell)

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

tom,
could you give an example
Nick

"Tom Ogilvy" wrote:

possibly use a defined name with a formula to determine which cell to return.

this might be practical for a small number of formulas.

--
Regards,
Tom Ogilvy


"100pinesfarm" wrote:

example:
IF(OR(F3="BD",F3="CD"),B6,C6)

if cell "F3" is a certain value my formula requires different cell values,
this may occur numerous times in a formula, so I would like to have a shorter
way to say it.
"F3" has a limited (@4) different possibilities, but the "OR" combinations &
the goto's are quite numerous.
Thanks for any help!
Nick

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
fill a cell based on another cells value r2rcode Excel Worksheet Functions 3 March 4th 10 04:56 PM
cell value based on another cells formula??? Lance1961 Excel Discussion (Misc queries) 7 September 15th 09 12:29 PM
Formatting a cell based on another cells value b o b Excel Discussion (Misc queries) 1 June 16th 06 11:48 PM
protect cells based on another cell Neil Excel Worksheet Functions 6 August 9th 05 03:13 PM
sum cells based on another cell value Anauna Excel Worksheet Functions 3 February 4th 05 01:26 PM


All times are GMT +1. The time now is 04:52 AM.

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"