ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Filling an array with data (https://www.excelbanter.com/excel-worksheet-functions/26703-filling-array-data.html)

Dongle

Filling an array with data
 
Using Excel 2003. Trying to fill an amount of cells with data. The amount is
depending on an other cell. Example:
A1 = 6, B1 = 3.81.
A2 =3, B2 = 6.53
Now I want C1:C6 to be 3.81 and C7:C9 to be 6.53 and when A1 = 9, I want
C1:C9 to be 3.81
Thanks in advance for any help.
Dongle

Gary Brown

Put the following formula in Cell C1 and copy down...
=IF(ROW()<=$A$1,$B$1,IF(AND(ROW()$A$1,ROW()<$A$1+ $A$2+1),$B$2,"No"))
HTH,
--
Gary Brown



"Dongle" wrote:

Using Excel 2003. Trying to fill an amount of cells with data. The amount is
depending on an other cell. Example:
A1 = 6, B1 = 3.81.
A2 =3, B2 = 6.53
Now I want C1:C6 to be 3.81 and C7:C9 to be 6.53 and when A1 = 9, I want
C1:C9 to be 3.81
Thanks in advance for any help.
Dongle


Dongle

Hai Gary,
Thanks, coming in the right direction, but the formula is taking two cells
and C2, C4 and so on, remain empty.
I'll try further with your suggestion.
Dongle.

"Gary Brown" schreef:

Put the following formula in Cell C1 and copy down...
=IF(ROW()<=$A$1,$B$1,IF(AND(ROW()$A$1,ROW()<$A$1+ $A$2+1),$B$2,"No"))
HTH,
--
Gary Brown



"Dongle" wrote:

Using Excel 2003. Trying to fill an amount of cells with data. The amount is
depending on an other cell. Example:
A1 = 6, B1 = 3.81.
A2 =3, B2 = 6.53
Now I want C1:C6 to be 3.81 and C7:C9 to be 6.53 and when A1 = 9, I want
C1:C9 to be 3.81
Thanks in advance for any help.
Dongle



All times are GMT +1. The time now is 02:50 PM.

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