Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Concatenate different ranges
Hi all,
I have data for every hour in 2001 in one sheet and data for every da in another sheet. Now I would like to apply 1/24 of the daily data from the second shee to each of the 24 hour periods in the first sheet - how can I do this (automatically!) VBA is new to me, and I would like to know if I - either directly i Excel or in VBA - can do arithmic within the cell address itself. Can in any way do something like this: write A(1+B2) in C3 and make i work? If B2=3 and A4=2 then C3 shuold end up beeing 2 ... What if I use the R1C1 approach? Any help appreciate -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Concatenate different ranges
Oxy,
Try entering the following in cell C3: =INDIRECT("A"& TEXT(1+B2,0)) HTH Tim "oxymoron" wrote in message ... VBA is new to me, and I would like to know if I - either directly in Excel or in VBA - can do arithmic within the cell address itself. Can I in any way do something like this: write A(1+B2) in C3 and make it work? If B2=3 and A4=2 then C3 shuold end up beeing 2 ... What if I use the R1C1 approach? Any help appreciated Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Concatenate different ranges
Another way:
=OFFSET(A1,B2,0) In article , "Tim Barlow" wrote: Oxy, Try entering the following in cell C3: =INDIRECT("A"& TEXT(1+B2,0)) HTH Tim "oxymoron" wrote in message ... VBA is new to me, and I would like to know if I - either directly in Excel or in VBA - can do arithmic within the cell address itself. Can I in any way do something like this: write A(1+B2) in C3 and make it work? If B2=3 and A4=2 then C3 shuold end up beeing 2 ... What if I use the R1C1 approach? Any help appreciated Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Concatenate different ranges
THX both of you - this solved my problems!
The INDIRECT approach isn't described in the Excel Help-file but I like it ... OFFSET is great too - can't believe I missed this feature for so long ;-) --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
syntax to concatenate two named ranges? | Excel Discussion (Misc queries) | |||
concatenate dynamic ranges | Excel Worksheet Functions | |||
Data validation: concatenate two separate ranges in the List? | Excel Discussion (Misc queries) | |||
Concatenate a reference to named ranges in other workbook | Excel Worksheet Functions | |||
Concatenate function should accept cell-ranges | Excel Discussion (Misc queries) |