Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Incrementing by 1 in every other column

Cells L3 and M3 are merged cells. The formula in cell L3 is:

=IF(Period_End=COLUMN(L1)-11,VLOOKUP(COLUMN(L1)-11,Period_End_Lookup,2),"")
= May 2007

Cells N3 and O3 are also merged cells. The formula in cell N3 is:

=IF(Period_End=COLUMN(N1)-12,VLOOKUP(COLUMN(N1)-12,Period_End_Lookup,2),"")
= Jun 2007

Notice that I had to hard-code 11 in the 1st formula, and 12 in the second
formula in order for the dates to come out correctly.

Rather than hard-code any numbers, I would prefer to use an algorithm within
the existing formulas that would increment the count by 1 even though the
formulas are located in every other column.

Any help/guidance would be greatly appreciated.

Thanks,
Bob

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Incrementing by 1 in every other column

Try substituting this for the number 11. When copied, it should increment as
you want.

(INT(COLUMN(L1)/2)+5)

HTH,
Elkar


"Bob" wrote:

Cells L3 and M3 are merged cells. The formula in cell L3 is:

=IF(Period_End=COLUMN(L1)-11,VLOOKUP(COLUMN(L1)-11,Period_End_Lookup,2),"")
= May 2007

Cells N3 and O3 are also merged cells. The formula in cell N3 is:

=IF(Period_End=COLUMN(N1)-12,VLOOKUP(COLUMN(N1)-12,Period_End_Lookup,2),"")
= Jun 2007

Notice that I had to hard-code 11 in the 1st formula, and 12 in the second
formula in order for the dates to come out correctly.

Rather than hard-code any numbers, I would prefer to use an algorithm within
the existing formulas that would increment the count by 1 even though the
formulas are located in every other column.

Any help/guidance would be greatly appreciated.

Thanks,
Bob

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Incrementing by 1 in every other column

Elkar,
Your formula segment did the trick. Thanks a million!
Bob

"Elkar" wrote:

Try substituting this for the number 11. When copied, it should increment as
you want.

(INT(COLUMN(L1)/2)+5)

HTH,
Elkar


"Bob" wrote:

Cells L3 and M3 are merged cells. The formula in cell L3 is:

=IF(Period_End=COLUMN(L1)-11,VLOOKUP(COLUMN(L1)-11,Period_End_Lookup,2),"")
= May 2007

Cells N3 and O3 are also merged cells. The formula in cell N3 is:

=IF(Period_End=COLUMN(N1)-12,VLOOKUP(COLUMN(N1)-12,Period_End_Lookup,2),"")
= Jun 2007

Notice that I had to hard-code 11 in the 1st formula, and 12 in the second
formula in order for the dates to come out correctly.

Rather than hard-code any numbers, I would prefer to use an algorithm within
the existing formulas that would increment the count by 1 even though the
formulas are located in every other column.

Any help/guidance would be greatly appreciated.

Thanks,
Bob

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
incrementing luuthur Excel Discussion (Misc queries) 4 May 23rd 07 05:07 AM
Incrementing a hexidecimal column Bryan Excel Discussion (Misc queries) 7 March 30th 07 03:04 PM
sorting and incrementing down blk&wht Excel Discussion (Misc queries) 1 October 9th 06 04:02 PM
Variable Incrementing John Excel Discussion (Misc queries) 3 May 12th 06 10:16 PM
incrementing column symbols orthogonally? z.entropic Excel Worksheet Functions 3 April 14th 05 10:05 PM


All times are GMT +1. The time now is 06:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"