ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If, If, If, If, If ... (https://www.excelbanter.com/excel-discussion-misc-queries/209850-if-if-if-if-if.html)

Neil Pearce

If, If, If, If, If ...
 
Dear all,

Column A contains building work items decriptions in text: Excavate, Build
Wall...

Columns C-Z contain differrent projects with corresponding associated
quantities for each item

Columns C-Z also have an option button over their headings. The option
buttons are group with their link cell located in cell B1. The output of the
option buttons are therefore 1-24.

Based on the option box selected I wish to copy that projects data into
column B so that just columns A& B can be printed. I can obviously create a
massivley long IF, within an If statement for each of the cells in coumn B:
=IF(B1=1,C4,IF(B1=2,D2,IF(B1=3,E4,IF(... IF(B1=24,Z24,"Error")))... However
this is clearly not the best apprach to fulfill my aim.

Any ideas? Help much appreaciated, thank-you.


Kind regards,

Neil

Sean Timmons

If, If, If, If, If ...
 
you can do this... Make a table with your 1 - 24 in, say, column D and your
cell references in column E. So, D2 is 1, E2 is C4...

then, in column B, type

=INDIRECT(VLOOKUP(C2,D:E,2,0))

"Neil Pearce" wrote:

Dear all,

Column A contains building work items decriptions in text: Excavate, Build
Wall...

Columns C-Z contain differrent projects with corresponding associated
quantities for each item

Columns C-Z also have an option button over their headings. The option
buttons are group with their link cell located in cell B1. The output of the
option buttons are therefore 1-24.

Based on the option box selected I wish to copy that projects data into
column B so that just columns A& B can be printed. I can obviously create a
massivley long IF, within an If statement for each of the cells in coumn B:
=IF(B1=1,C4,IF(B1=2,D2,IF(B1=3,E4,IF(... IF(B1=24,Z24,"Error")))... However
this is clearly not the best apprach to fulfill my aim.

Any ideas? Help much appreaciated, thank-you.


Kind regards,

Neil


Neil Pearce

If, If, If, If, If ...
 
Coeey all, please don't waste your time on this...

=INDEX($C$4:$Z$104,ROW()-3,$B$1)

Worked nicely.


"Neil Pearce" wrote:

Dear all,

Column A contains building work items decriptions in text: Excavate, Build
Wall...

Columns C-Z contain differrent projects with corresponding associated
quantities for each item

Columns C-Z also have an option button over their headings. The option
buttons are group with their link cell located in cell B1. The output of the
option buttons are therefore 1-24.

Based on the option box selected I wish to copy that projects data into
column B so that just columns A& B can be printed. I can obviously create a
massivley long IF, within an If statement for each of the cells in coumn B:
=IF(B1=1,C4,IF(B1=2,D2,IF(B1=3,E4,IF(... IF(B1=24,Z24,"Error")))... However
this is clearly not the best apprach to fulfill my aim.

Any ideas? Help much appreaciated, thank-you.


Kind regards,

Neil



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com