Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default Incrementing cell reference in Lookup formula

Hi Group,

With the following formula in B10
=IF(A10=1,LOOKUP(DAY(H$5),RANDOM!A$1:AE$1,RANDOM!A 2:AE2),"")

If I input 3 into L8 I need the formula to update to
=IF(A10=1,LOOKUP(DAY(H$5),RANDOM!A$1:AE$1,RANDOM!A 5:AE5),"")

If I input 10 into L8 I need the formula to update to
=IF(A10=1,LOOKUP(DAY(H$5),RANDOM!A$1:AE$1,RANDOM!A 12:AE12),"")
A zero or blank in L8 should leave the formula unchanged.

Thank you for any help
Martin



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Incrementing cell reference in Lookup formula

Try using INDIRECT, viz.:
=IF(A10=1,LOOKUP(DAY(H$5),Random!A$1:AE$1,INDIRECT ("Random!A"&L8+2&":AE"&L8+2)),"")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"MartinW" wrote in message
...
Hi Group,

With the following formula in B10
=IF(A10=1,LOOKUP(DAY(H$5),RANDOM!A$1:AE$1,RANDOM!A 2:AE2),"")

If I input 3 into L8 I need the formula to update to
=IF(A10=1,LOOKUP(DAY(H$5),RANDOM!A$1:AE$1,RANDOM!A 5:AE5),"")

If I input 10 into L8 I need the formula to update to
=IF(A10=1,LOOKUP(DAY(H$5),RANDOM!A$1:AE$1,RANDOM!A 12:AE12),"")
A zero or blank in L8 should leave the formula unchanged.

Thank you for any help
Martin





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default Incrementing cell reference in Lookup formula

Thank you Max, Works like a charm!
I had actually attempted that approach but got hopelessly lost in the
syntax.
As usual I was over-complicating things.

Thanks again!
Martin



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Incrementing cell reference in Lookup formula

welcome, Martin. good to hear that.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"MartinW" wrote in message
...
Thank you Max, Works like a charm!
I had actually attempted that approach but got hopelessly lost in the
syntax.
As usual I was over-complicating things.

Thanks again!
Martin





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
Can you lookup a value & get the cell reference? S. Bevins Excel Worksheet Functions 4 September 7th 06 05:44 PM
two way lookup and cell reference Detat Excel Worksheet Functions 2 August 3rd 06 04:15 PM
Return cell reference of lookup value bobm Excel Worksheet Functions 3 July 7th 05 08:49 AM
incrementing formula reference by 7 Patti Excel Discussion (Misc queries) 2 January 20th 05 08:23 PM
Incrementing rows (or columns) to a reference in another worksheet Ignobilitor Excel Worksheet Functions 2 January 20th 05 03:45 PM


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