Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Formula question - does anybody have the answers?

What I'm trying to do is simple, but the explanation may not be.

Right now, I have an autosort code in my spreadsheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("R3")) Is Nothing Then
Exit Sub
End If

Application.EnableEvents = False
Columns("A:S").Sort _
Key1:=Range("B3"), order1:=xlAscending, _
Key2:=Range("G3"), order2:=xlDescending, _
Key3:=Range("K3"), order3:=xlDescending, _
header:=xlYes

Range("A3:S3").Insert Shift:=xlDown
Application.EnableEvents = True
End Sub

The idea is to input data into row 3, and once column R has a value and
"enter" is pushed, the row populates into the rest of the spreadsheet based
on three keys. As is, the spreadsheet works beautifully. The problem: the
value for G3 (mentioned in Key 2) is derived (or should be) from an average
from C3:F3, and when the autosort coding kicks in, all data from row 3 is
inserted into the spreadsheet, and what we're left with is a completely blank
row. If I type in the average formula into that cell, it goes with the rest
of the row into whereever it fits, which is fine, but I need a way to make
that formula always autopopulate into G3. Is there any way to make this
happen, or is there another route I could take?

All help is much appreciated!

Thanks,

Orangepegs
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Formula question - does anybody have the answers?

Try changing the sort range to not include row 3. You ignored that suggestion
at your other thread.

Orangepegs wrote:

What I'm trying to do is simple, but the explanation may not be.

Right now, I have an autosort code in my spreadsheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("R3")) Is Nothing Then
Exit Sub
End If

Application.EnableEvents = False
Columns("A:S").Sort _
Key1:=Range("B3"), order1:=xlAscending, _
Key2:=Range("G3"), order2:=xlDescending, _
Key3:=Range("K3"), order3:=xlDescending, _
header:=xlYes

Range("A3:S3").Insert Shift:=xlDown
Application.EnableEvents = True
End Sub

The idea is to input data into row 3, and once column R has a value and
"enter" is pushed, the row populates into the rest of the spreadsheet based
on three keys. As is, the spreadsheet works beautifully. The problem: the
value for G3 (mentioned in Key 2) is derived (or should be) from an average
from C3:F3, and when the autosort coding kicks in, all data from row 3 is
inserted into the spreadsheet, and what we're left with is a completely blank
row. If I type in the average formula into that cell, it goes with the rest
of the row into whereever it fits, which is fine, but I need a way to make
that formula always autopopulate into G3. Is there any way to make this
happen, or is there another route I could take?

All help is much appreciated!

Thanks,

Orangepegs


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Formula question - does anybody have the answers?

Rather than inserting a blank row, could you copy-insert a hidden row
which contains the required formulae?

On 16 Jan, 19:08, Dave Peterson wrote:
Try changing the sort range to not include row 3. You ignored that suggestion
at your other thread.



Orangepegs wrote:

What I'm trying to do is simple, but the explanation may not be.


Right now, I have an autosort code in my spreadsheet:


Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("R3")) Is Nothing Then
Exit Sub
End If


Application.EnableEvents = False
Columns("A:S").Sort _
Key1:=Range("B3"), order1:=xlAscending, _
Key2:=Range("G3"), order2:=xlDescending, _
Key3:=Range("K3"), order3:=xlDescending, _
header:=xlYes


Range("A3:S3").Insert Shift:=xlDown
Application.EnableEvents = True
End Sub


The idea is to input data into row 3, and once column R has a value and
"enter" is pushed, the row populates into the rest of the spreadsheet based
on three keys. As is, the spreadsheet works beautifully. The problem: the
value for G3 (mentioned in Key 2) is derived (or should be) from an average
from C3:F3, and when the autosort coding kicks in, all data from row 3 is
inserted into the spreadsheet, and what we're left with is a completely blank
row. If I type in the average formula into that cell, it goes with the rest
of the row into whereever it fits, which is fine, but I need a way to make
that formula always autopopulate into G3. Is there any way to make this
happen, or is there another route I could take?


All help is much appreciated!


Thanks,


Orangepegs--


Dave Peterson


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Formula question - does anybody have the answers?

how would I do that?

"Rupert" wrote:

Rather than inserting a blank row, could you copy-insert a hidden row
which contains the required formulae?

On 16 Jan, 19:08, Dave Peterson wrote:
Try changing the sort range to not include row 3. You ignored that suggestion
at your other thread.



Orangepegs wrote:

What I'm trying to do is simple, but the explanation may not be.


Right now, I have an autosort code in my spreadsheet:


Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("R3")) Is Nothing Then
Exit Sub
End If


Application.EnableEvents = False
Columns("A:S").Sort _
Key1:=Range("B3"), order1:=xlAscending, _
Key2:=Range("G3"), order2:=xlDescending, _
Key3:=Range("K3"), order3:=xlDescending, _
header:=xlYes


Range("A3:S3").Insert Shift:=xlDown
Application.EnableEvents = True
End Sub


The idea is to input data into row 3, and once column R has a value and
"enter" is pushed, the row populates into the rest of the spreadsheet based
on three keys. As is, the spreadsheet works beautifully. The problem: the
value for G3 (mentioned in Key 2) is derived (or should be) from an average
from C3:F3, and when the autosort coding kicks in, all data from row 3 is
inserted into the spreadsheet, and what we're left with is a completely blank
row. If I type in the average formula into that cell, it goes with the rest
of the row into whereever it fits, which is fine, but I need a way to make
that formula always autopopulate into G3. Is there any way to make this
happen, or is there another route I could take?


All help is much appreciated!


Thanks,


Orangepegs--


Dave Peterson



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
COUNTIF in between rows Vasilis Tergen Excel Worksheet Functions 20 January 13th 07 10:22 PM
How do I create an If/or formula with more then two answers? LisaLisaKK Excel Discussion (Misc queries) 4 October 5th 06 06:39 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
formula question Pam Coleman Excel Worksheet Functions 9 April 11th 05 08:51 AM


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

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

About Us

"It's about Microsoft Excel"