Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ym4life
 
Posts: n/a
Default Formulas containing variable input


Hi guys:
I suck at Excel, so I would really appreciate any help. Here's the
deal, I have a huge spreadsheet in which each column contains the data
pertaining to each month. for example B is january, C is February, and
so on... I have a separate sheet where calculations are carried out,
and one such calculation requires summing up the columns of data from
all previous month including the current month. for instance, if it
were march, I would have someth like =Sum(B9:D9), for the month of june
i would have =Sum(B9:G9). it's a pain changing the formula manually
every month, so is there a way to represent the second column letter in
the formula as a variable input that depends on the current month? I
want it in the form of =Sum(B9:X9), where X is an expression that
represents the correct column. i tried nested formulas like:
=Sum(B9:('HelpSheet'!A1)9), where 'HelpSheet!'A1 is a cell in another
sheet that contains the appropriate column letter. Obvious my blind
attempts didn't work, so hope you guys can give some suggestions.
Cheers,
JR Shaw


--
ym4life
------------------------------------------------------------------------
ym4life's Profile: http://www.excelforum.com/member.php...o&userid=24768
View this thread: http://www.excelforum.com/showthread...hreadid=383345

  #2   Report Post  
Domenic
 
Posts: n/a
Default


Try...

=SUM(INDIRECT("B9:"&'HelpSheet'!A1&"9"))

Hope this helps!

ym4life Wrote:
Hi guys:
I suck at Excel, so I would really appreciate any help. Here's the
deal, I have a huge spreadsheet in which each column contains the data
pertaining to each month. for example B is january, C is February, and
so on... I have a separate sheet where calculations are carried out,
and one such calculation requires summing up the columns of data from
all previous month including the current month. for instance, if it
were march, I would have someth like =Sum(B9:D9), for the month of june
i would have =Sum(B9:G9). it's a pain changing the formula manually
every month, so is there a way to represent the second column letter in
the formula as a variable input that depends on the current month? I
want it in the form of =Sum(B9:X9), where X is an expression that
represents the correct column. i tried nested formulas like:
=Sum(B9:('HelpSheet'!A1)9), where 'HelpSheet!'A1 is a cell in another
sheet that contains the appropriate column letter. Obvious my blind
attempts didn't work, so hope you guys can give some suggestions.
Cheers,
JR Shaw



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=383345

  #3   Report Post  
ym4life
 
Posts: n/a
Default


Thanks a lot for the suggestion, I tried it and every imaginable
combination of formulas using INDIRECT, but i keep on getting Value and
Ref errors.... i'll keep on trying and any advice is much welcomed


--
ym4life
------------------------------------------------------------------------
ym4life's Profile: http://www.excelforum.com/member.php...o&userid=24768
View this thread: http://www.excelforum.com/showthread...hreadid=383345

  #4   Report Post  
Morrigan
 
Posts: n/a
Default


Try this

=Sum($B$9:B9)


Hope this helps


--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=383345

  #5   Report Post  
Domenic
 
Posts: n/a
Default


ym4life Wrote:
Thanks a lot for the suggestion, I tried it and every imaginable
combination of formulas using INDIRECT, but i keep on getting Value and
Ref errors.... i'll keep on trying and any advice is much welcomed


Hmmm...that's strange...it works for me. If you'd like, I can send you
a sample file.


--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=383345



  #6   Report Post  
Gary
 
Posts: n/a
Default

I would insert a range name covering all of your current and future column
totals by highlighting them and selecting: 'Insert, name, define.' You can
call it any name you wish. Once you have done this, all you have to do is
refer to the name in the formula. i.e. =sum(yourrangename). Hope this sorts
you out.

Gary

"ym4life" wrote:


Hi guys:
I suck at Excel, so I would really appreciate any help. Here's the
deal, I have a huge spreadsheet in which each column contains the data
pertaining to each month. for example B is january, C is February, and
so on... I have a separate sheet where calculations are carried out,
and one such calculation requires summing up the columns of data from
all previous month including the current month. for instance, if it
were march, I would have someth like =Sum(B9:D9), for the month of june
i would have =Sum(B9:G9). it's a pain changing the formula manually
every month, so is there a way to represent the second column letter in
the formula as a variable input that depends on the current month? I
want it in the form of =Sum(B9:X9), where X is an expression that
represents the correct column. i tried nested formulas like:
=Sum(B9:('HelpSheet'!A1)9), where 'HelpSheet!'A1 is a cell in another
sheet that contains the appropriate column letter. Obvious my blind
attempts didn't work, so hope you guys can give some suggestions.
Cheers,
JR Shaw


--
ym4life
------------------------------------------------------------------------
ym4life's Profile: http://www.excelforum.com/member.php...o&userid=24768
View this thread: http://www.excelforum.com/showthread...hreadid=383345


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
paste formulas between workbooks without workbook link ron Excel Discussion (Misc queries) 3 April 22nd 23 08:11 AM
Input Form vba help mdalzell Excel Discussion (Misc queries) 0 April 8th 05 03:57 PM
Problem with named formula's nathan Excel Worksheet Functions 0 January 21st 05 04:07 PM
Way to make Excel only run certain formulas on a worksheet? jrusso Excel Discussion (Misc queries) 0 January 12th 05 04:23 PM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 05:22 PM


All times are GMT +1. The time now is 02:16 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"