Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Add cell in every 7th column

Hello,

How do I write a function that adds the values for the intersection between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Add cell in every 7th column

Try this

=SUM(IF(MOD(COLUMN(G12:IV12),7)=0,G12:IV12,0))

This is an array and must be entered with CTRL+Shift+Enter.

Mike

"Igorin" wrote:

Hello,

How do I write a function that adds the values for the intersection between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Add cell in every 7th column

=SUMPRODUCT(G12:AB12,--(MOD(COLUMN(G12:AB12),7)=0))
--
David Biddulph

"Igorin" wrote in message
...
Hello,

How do I write a function that adds the values for the intersection
between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Add cell in every 7th column

Mike, thank yo very much for the reply,

I just tried this and it returns a null value. By the way, I did not get the
part about using the CTRL+Shift+Enter. I copied the formula and pasted it
inside the cell itself and then modified the cell references.

What did I do wrong?

--
igor


"Mike H" wrote:

Try this

=SUM(IF(MOD(COLUMN(G12:IV12),7)=0,G12:IV12,0))

This is an array and must be entered with CTRL+Shift+Enter.

Mike

"Igorin" wrote:

Hello,

How do I write a function that adds the values for the intersection between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Add cell in every 7th column

Try this:

=SUMPRODUCT(--(MOD(COLUMN(G12:BY12)-COLUMN(G12),7)=0),G12:BY12)

Adjust the end of range as needed

--
Biff
Microsoft Excel MVP


"Igorin" wrote in message
...
Hello,

How do I write a function that adds the values for the intersection
between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Add cell in every 7th column

Thanks for the help, David,

I'm not getting the right amount. It returns the value in the 7th cell but
not the sum of all th cells.


--
igor


"David Biddulph" wrote:

=SUMPRODUCT(G12:AB12,--(MOD(COLUMN(G12:AB12),7)=0))
--
David Biddulph

"Igorin" wrote in message
...
Hello,

How do I write a function that adds the values for the intersection
between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Add cell in every 7th column

It works!!!

Thanks a lot, T.!

--
igor


"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(MOD(COLUMN(G12:BY12)-COLUMN(G12),7)=0),G12:BY12)

Adjust the end of range as needed

--
Biff
Microsoft Excel MVP


"Igorin" wrote in message
...
Hello,

How do I write a function that adds the values for the intersection
between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Add cell in every 7th column

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Igorin" wrote in message
...
It works!!!

Thanks a lot, T.!

--
igor


"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(MOD(COLUMN(G12:BY12)-COLUMN(G12),7)=0),G12:BY12)

Adjust the end of range as needed

--
Biff
Microsoft Excel MVP


"Igorin" wrote in message
...
Hello,

How do I write a function that adds the values for the intersection
between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Add cell in every 7th column

The formula works for me. It gives me the same as =G12+N12+U12+AB12
Perhaps you need to check that you really have numbers in N12, U12, and
AB12, and not text? Make sure that there are no spaces or non-printing
characters. What do =ISNUMBER(N12) and =ISTEXT(N12) give?
--
David Biddulph

"Igorin" wrote in message
...
Thanks for the help, David,

I'm not getting the right amount. It returns the value in the 7th cell but
not the sum of all th cells.


--
igor


"David Biddulph" wrote:

=SUMPRODUCT(G12:AB12,--(MOD(COLUMN(G12:AB12),7)=0))
--
David Biddulph

"Igorin" wrote in message
...
Hello,

How do I write a function that adds the values for the intersection
between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Add cell in every 7th column

Note also that my formula is effectively the same as Biff's which you say
works for you. He had:
=SUMPRODUCT(--(MOD(COLUMN(G12:BY12)-COLUMN(G12),7)=0),G12:BY12)

COLUMN(G12) is 7, so that won't affect the MOD result. The only significant
difference is that his range goes on beyond AB12 to BY12, but of course my
formula can be extended to cover whatever range is appropriate. If there
are cells such as N12, U12 and AB12 which you say are being picked up by
Biff';s formula but not by mine, I would be very intrigued to know why.
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
The formula works for me. It gives me the same as =G12+N12+U12+AB12
Perhaps you need to check that you really have numbers in N12, U12, and
AB12, and not text? Make sure that there are no spaces or non-printing
characters. What do =ISNUMBER(N12) and =ISTEXT(N12) give?
--
David Biddulph

"Igorin" wrote in message
...
Thanks for the help, David,

I'm not getting the right amount. It returns the value in the 7th cell
but
not the sum of all th cells.


--
igor


"David Biddulph" wrote:

=SUMPRODUCT(G12:AB12,--(MOD(COLUMN(G12:AB12),7)=0))
--
David Biddulph

"Igorin" wrote in message
...
Hello,

How do I write a function that adds the values for the intersection
between
row 12 and every 7th column (to give a concrete example) .

To illustrate:

Add the cells G12, N12, U12, AB12, ...

Can somebody give me an idea?

--
igor







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
Maddening Dilemma - Compare each cell within column a to each cell in column b and find unique matches [email protected] Excel Worksheet Functions 66 May 1st 23 03:44 AM
Sum Cell Values of one column based on Another Cell Value in a different column kristenb via OfficeKB.com Excel Worksheet Functions 5 April 26th 23 07:41 PM
compare cells in column to criteria, then average next column cell Bradwin Excel Worksheet Functions 2 July 21st 08 08:37 PM
Need Formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date kakasay Excel Discussion (Misc queries) 1 January 22nd 07 12:31 PM
Format cell in column B based on value in the next cell (column c) Nicole Excel Discussion (Misc queries) 7 May 18th 05 10:19 PM


All times are GMT +1. The time now is 12:32 AM.

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"