PC Review


Reply
Thread Tools Rate Thread

Copy the formula not the cell data?

 
 
J Hawes
Guest
Posts: n/a
 
      29th Sep 2004
I am trying to copy a formula to all the cells in a column by using
copy/paste. It copies the formula correctly but it also copies the data
from the selected cell instead of leaving it blank.

For example, if the cell used for the copy contains the number 40, then 40
appears in all the copied cells. The formula itself is correct.

This function is for calculating the a sum of hours and minutes. e.g. 2
hours 30 minutes + 1 hour 50 minutes = 4 hours 20 minutes. The formula
works just fine.

Here is the Hours formula:

=IF((E9+C10)>60, D9+B10+1,D9+B10)

Here is the Minutes formula:

=IF((E9+C10)>60,E9+C10-60,E9+C10)

I think I need to format the formula so that it says logically...

=IF (B10+C10) <>0 THEN (the formulae above) i.e. if the hours and minutes
for the row are not blank then do the calculation, but I don't know the
syntax for this.

Thank you very much for any help.

Joan


 
Reply With Quote
 
 
 
 
JulieD
Guest
Posts: n/a
 
      29th Sep 2004
Hi

from the sound of it your calculation might be set to manual rather than
automatic .. .try tools / options / calculations and ensure automatic is
selected .. now when you copy a formula to another cell, the formula should
evaluate the cells it refers to.

Let us know if this helped
Cheers
JulieD

"J Hawes" <(E-Mail Removed)> wrote in message
news:1Fw6d.731$eq.605@edtnps84...
>I am trying to copy a formula to all the cells in a column by using
>copy/paste. It copies the formula correctly but it also copies the data
>from the selected cell instead of leaving it blank.
>
> For example, if the cell used for the copy contains the number 40, then 40
> appears in all the copied cells. The formula itself is correct.
>
> This function is for calculating the a sum of hours and minutes. e.g. 2
> hours 30 minutes + 1 hour 50 minutes = 4 hours 20 minutes. The formula
> works just fine.
>
> Here is the Hours formula:
>
> =IF((E9+C10)>60, D9+B10+1,D9+B10)
>
> Here is the Minutes formula:
>
> =IF((E9+C10)>60,E9+C10-60,E9+C10)
>
> I think I need to format the formula so that it says logically...
>
> =IF (B10+C10) <>0 THEN (the formulae above) i.e. if the hours and minutes
> for the row are not blank then do the calculation, but I don't know the
> syntax for this.
>
> Thank you very much for any help.
>
> Joan
>



 
Reply With Quote
 
David McRitchie
Guest
Posts: n/a
 
      29th Sep 2004
Hi Joan,
Aside from the problem you mentioned, I think the calculations and
display would be easier on yourself if you used Excel time rather than
trying to store time as 2 digit hours component, and 2 digit minutes
component in separate cells.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"JulieD" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hi
>
> from the sound of it your calculation might be set to manual rather than
> automatic .. .try tools / options / calculations and ensure automatic is
> selected .. now when you copy a formula to another cell, the formula should
> evaluate the cells it refers to.
>
> Let us know if this helped
> Cheers
> JulieD
>
> "J Hawes" <(E-Mail Removed)> wrote in message
> news:1Fw6d.731$eq.605@edtnps84...
> >I am trying to copy a formula to all the cells in a column by using
> >copy/paste. It copies the formula correctly but it also copies the data
> >from the selected cell instead of leaving it blank.
> >
> > For example, if the cell used for the copy contains the number 40, then 40
> > appears in all the copied cells. The formula itself is correct.
> >
> > This function is for calculating the a sum of hours and minutes. e.g. 2
> > hours 30 minutes + 1 hour 50 minutes = 4 hours 20 minutes. The formula
> > works just fine.
> >
> > Here is the Hours formula:
> >
> > =IF((E9+C10)>60, D9+B10+1,D9+B10)
> >
> > Here is the Minutes formula:
> >
> > =IF((E9+C10)>60,E9+C10-60,E9+C10)
> >
> > I think I need to format the formula so that it says logically...
> >
> > =IF (B10+C10) <>0 THEN (the formulae above) i.e. if the hours and minutes
> > for the row are not blank then do the calculation, but I don't know the
> > syntax for this.
> >
> > Thank you very much for any help.
> >
> > Joan
> >

>
>



 
Reply With Quote
 
J Hawes
Guest
Posts: n/a
 
      29th Sep 2004
The calculation option was already set to automatic. Sorry.

Joan


"JulieD" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> from the sound of it your calculation might be set to manual rather than
> automatic .. .try tools / options / calculations and ensure automatic is
> selected .. now when you copy a formula to another cell, the formula
> should evaluate the cells it refers to.
>
> Let us know if this helped
> Cheers
> JulieD
>
> "J Hawes" <(E-Mail Removed)> wrote in message
> news:1Fw6d.731$eq.605@edtnps84...
>>I am trying to copy a formula to all the cells in a column by using
>>copy/paste. It copies the formula correctly but it also copies the data
>>from the selected cell instead of leaving it blank.
>>
>> For example, if the cell used for the copy contains the number 40, then
>> 40 appears in all the copied cells. The formula itself is correct.
>>
>> This function is for calculating the a sum of hours and minutes. e.g. 2
>> hours 30 minutes + 1 hour 50 minutes = 4 hours 20 minutes. The formula
>> works just fine.
>>
>> Here is the Hours formula:
>>
>> =IF((E9+C10)>60, D9+B10+1,D9+B10)
>>
>> Here is the Minutes formula:
>>
>> =IF((E9+C10)>60,E9+C10-60,E9+C10)
>>
>> I think I need to format the formula so that it says logically...
>>
>> =IF (B10+C10) <>0 THEN (the formulae above) i.e. if the hours and
>> minutes for the row are not blank then do the calculation, but I don't
>> know the syntax for this.
>>
>> Thank you very much for any help.
>>
>> Joan
>>

>
>



 
Reply With Quote
 
J Hawes
Guest
Posts: n/a
 
      29th Sep 2004
It isn't the clock time I am summing, it is the accumulated number of
hours/minutes taken to complete a task.

Example:

Row 1 Task hours Task minutes Hours-to-date Minutes-to-date
Row 2 2 30 2
30
Row 3 4 45 7
15

Does this help?

Joan


"David McRitchie" <d

(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Joan,
> Aside from the problem you mentioned, I think the calculations and
> display would be easier on yourself if you used Excel time rather than
> trying to store time as 2 digit hours component, and 2 digit minutes
> component in separate cells.
> ---
> HTH,
> David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
> My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
> Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
>
> "JulieD" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi
>>
>> from the sound of it your calculation might be set to manual rather than
>> automatic .. .try tools / options / calculations and ensure automatic is
>> selected .. now when you copy a formula to another cell, the formula
>> should
>> evaluate the cells it refers to.
>>
>> Let us know if this helped
>> Cheers
>> JulieD
>>
>> "J Hawes" <(E-Mail Removed)> wrote in message
>> news:1Fw6d.731$eq.605@edtnps84...
>> >I am trying to copy a formula to all the cells in a column by using
>> >copy/paste. It copies the formula correctly but it also copies the data
>> >from the selected cell instead of leaving it blank.
>> >
>> > For example, if the cell used for the copy contains the number 40, then
>> > 40
>> > appears in all the copied cells. The formula itself is correct.
>> >
>> > This function is for calculating the a sum of hours and minutes. e.g.
>> > 2
>> > hours 30 minutes + 1 hour 50 minutes = 4 hours 20 minutes. The formula
>> > works just fine.
>> >
>> > Here is the Hours formula:
>> >
>> > =IF((E9+C10)>60, D9+B10+1,D9+B10)
>> >
>> > Here is the Minutes formula:
>> >
>> > =IF((E9+C10)>60,E9+C10-60,E9+C10)
>> >
>> > I think I need to format the formula so that it says logically...
>> >
>> > =IF (B10+C10) <>0 THEN (the formulae above) i.e. if the hours and
>> > minutes
>> > for the row are not blank then do the calculation, but I don't know
>> > the
>> > syntax for this.
>> >
>> > Thank you very much for any help.
>> >
>> > Joan
>> >

>>
>>

>
>



 
Reply With Quote
 
David McRitchie
Guest
Posts: n/a
 
      29th Sep 2004
Perhaps your formula had a leading space in it turning it to text.

> =IF((E9+C10)>60, D9+B10+1,D9+B10)
>
> Here is the Minutes formula:
> =IF((E9+C10)>60,E9+C10-60,E9+C10)


The following would allow insertion/deletion of rows and allow you
to start at row 2 because SUM ignores cells with text

C2: =SUM(OFFSET(C2,-1,0),A2,INT((SUM(OFFSET(D2,-1,0),B2))/60))
D2: =MOD(SUM(B2,OFFSET(D2,-1,0)),60)


what I was suggesting was:

A1: 'task_hh:mm
B1: 'total_hhmm
A2: 02:30
B2: =SUM(OFFSET(B2,-1,0),A2) format as [h]:mm
A3: 04:45
B3: =SUM(OFFSET(B3,-1,0),A3) format as [h]:mm



--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"J Hawes" <(E-Mail Removed)> wrote in message news:gjC6d.3194$Du2.1918@edtnps89...
> It isn't the clock time I am summing, it is the accumulated number of
> hours/minutes taken to complete a task.
>
> Example:
>
> Row 1 Task hours Task minutes Hours-to-date Minutes-to-date
> Row 2 2 30 2
> 30
> Row 3 4 45 7
> 15
>
> Does this help?
>
> Joan
>
>
> "David McRitchie" <d
>
> (E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi Joan,
> > Aside from the problem you mentioned, I think the calculations and
> > display would be easier on yourself if you used Excel time rather than
> > trying to store time as 2 digit hours component, and 2 digit minutes
> > component in separate cells.
> > ---
> > HTH,
> > David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
> > My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
> > Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
> >
> > "JulieD" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Hi
> >>
> >> from the sound of it your calculation might be set to manual rather than
> >> automatic .. .try tools / options / calculations and ensure automatic is
> >> selected .. now when you copy a formula to another cell, the formula
> >> should
> >> evaluate the cells it refers to.
> >>
> >> Let us know if this helped
> >> Cheers
> >> JulieD
> >>
> >> "J Hawes" <(E-Mail Removed)> wrote in message
> >> news:1Fw6d.731$eq.605@edtnps84...
> >> >I am trying to copy a formula to all the cells in a column by using
> >> >copy/paste. It copies the formula correctly but it also copies the data
> >> >from the selected cell instead of leaving it blank.
> >> >
> >> > For example, if the cell used for the copy contains the number 40, then
> >> > 40
> >> > appears in all the copied cells. The formula itself is correct.
> >> >
> >> > This function is for calculating the a sum of hours and minutes. e.g.
> >> > 2
> >> > hours 30 minutes + 1 hour 50 minutes = 4 hours 20 minutes. The formula
> >> > works just fine.
> >> >
> >> > Here is the Hours formula:
> >> >
> >> > =IF((E9+C10)>60, D9+B10+1,D9+B10)
> >> >
> >> > Here is the Minutes formula:
> >> >
> >> > =IF((E9+C10)>60,E9+C10-60,E9+C10)
> >> >
> >> > I think I need to format the formula so that it says logically...
> >> >
> >> > =IF (B10+C10) <>0 THEN (the formulae above) i.e. if the hours and
> >> > minutes
> >> > for the row are not blank then do the calculation, but I don't know
> >> > the
> >> > syntax for this.
> >> >
> >> > Thank you very much for any help.
> >> >
> >> > Joan
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
J Hawes
Guest
Posts: n/a
 
      29th Sep 2004
Hi David,

Actually, I just got the *&%(&^% thing to work, using these formulas:

Hours =IF(B10+C10=0," ",IF(E9+C10>59,D9+B10+1,D9+B10))

Minutes =IF(B10+C10=0," ",IF(E9+C10>59,E9+C10-60,E9+C10))

Many thanks to all for your help. I really do appreciate this newsgroup.

Joan



"David McRitchie" <(E-Mail Removed)> wrote in message
news:uxN6H$(E-Mail Removed)...
> Perhaps your formula had a leading space in it turning it to text.
>
>> =IF((E9+C10)>60, D9+B10+1,D9+B10)
>>
>> Here is the Minutes formula:
>> =IF((E9+C10)>60,E9+C10-60,E9+C10)

>
> The following would allow insertion/deletion of rows and allow you
> to start at row 2 because SUM ignores cells with text
>
> C2: =SUM(OFFSET(C2,-1,0),A2,INT((SUM(OFFSET(D2,-1,0),B2))/60))
> D2: =MOD(SUM(B2,OFFSET(D2,-1,0)),60)
>
>
> what I was suggesting was:
>
> A1: 'task_hh:mm
> B1: 'total_hhmm
> A2: 02:30
> B2: =SUM(OFFSET(B2,-1,0),A2) format as [h]:mm
> A3: 04:45
> B3: =SUM(OFFSET(B3,-1,0),A3) format as [h]:mm
>
>
>
> --
> ---
> HTH,
> David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
> My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
> Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
>
> "J Hawes" <(E-Mail Removed)> wrote in message
> news:gjC6d.3194$Du2.1918@edtnps89...
>> It isn't the clock time I am summing, it is the accumulated number of
>> hours/minutes taken to complete a task.
>>
>> Example:
>>
>> Row 1 Task hours Task minutes Hours-to-date Minutes-to-date
>> Row 2 2 30 2
>> 30
>> Row 3 4 45 7
>> 15
>>
>> Does this help?
>>
>> Joan
>>
>>
>> "David McRitchie" <d
>>
>> (E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi Joan,
>> > Aside from the problem you mentioned, I think the calculations and
>> > display would be easier on yourself if you used Excel time rather than
>> > trying to store time as 2 digit hours component, and 2 digit minutes
>> > component in separate cells.
>> > ---
>> > HTH,
>> > David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
>> > My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
>> > Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
>> >
>> > "JulieD" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> Hi
>> >>
>> >> from the sound of it your calculation might be set to manual rather
>> >> than
>> >> automatic .. .try tools / options / calculations and ensure automatic
>> >> is
>> >> selected .. now when you copy a formula to another cell, the formula
>> >> should
>> >> evaluate the cells it refers to.
>> >>
>> >> Let us know if this helped
>> >> Cheers
>> >> JulieD
>> >>
>> >> "J Hawes" <(E-Mail Removed)> wrote in message
>> >> news:1Fw6d.731$eq.605@edtnps84...
>> >> >I am trying to copy a formula to all the cells in a column by using
>> >> >copy/paste. It copies the formula correctly but it also copies the
>> >> >data
>> >> >from the selected cell instead of leaving it blank.
>> >> >
>> >> > For example, if the cell used for the copy contains the number 40,
>> >> > then
>> >> > 40
>> >> > appears in all the copied cells. The formula itself is correct.
>> >> >
>> >> > This function is for calculating the a sum of hours and minutes.
>> >> > e.g.
>> >> > 2
>> >> > hours 30 minutes + 1 hour 50 minutes = 4 hours 20 minutes. The
>> >> > formula
>> >> > works just fine.
>> >> >
>> >> > Here is the Hours formula:
>> >> >
>> >> > =IF((E9+C10)>60, D9+B10+1,D9+B10)
>> >> >
>> >> > Here is the Minutes formula:
>> >> >
>> >> > =IF((E9+C10)>60,E9+C10-60,E9+C10)
>> >> >
>> >> > I think I need to format the formula so that it says logically...
>> >> >
>> >> > =IF (B10+C10) <>0 THEN (the formulae above) i.e. if the hours and
>> >> > minutes
>> >> > for the row are not blank then do the calculation, but I don't know
>> >> > the
>> >> > syntax for this.
>> >> >
>> >> > Thank you very much for any help.
>> >> >
>> >> > Joan
>> >> >
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter, Cell Reference formula and copy formula on filter data umpire_43 Microsoft Excel Programming 0 9th Jul 2009 03:38 PM
formula to copy data to empty cell Olchannel Microsoft Excel New Users 1 27th Sep 2008 11:06 AM
Formula to copy cell data =?Utf-8?B?Q29uY2FycA==?= Microsoft Excel Misc 5 30th Oct 2006 03:58 AM
how do i copy just the data and not the formula in a cell? =?Utf-8?B?SG9sZGVuIENhdWxmaWVsZA==?= Microsoft Excel Misc 11 10th Mar 2006 09:13 PM
IN AN IF FORMULA COPY STRING OF DATA IF A CELL IS CORRECT =?Utf-8?B?TWlnaHQgYWxzbyBiZSBhbm90aGVyIHRyaWNreSBm Microsoft Excel Setup 1 12th Oct 2005 09:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:18 AM.