Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Userform sorting data

Hi Experts

Small problem for you for me its difficult -- the command button - code below
Private Sub Add1_Click()
Tb99.Value = ActiveSheet.Range("B26")
Tb100.Value = ActiveSheet.Range("C26")
Tb101.Value = ActiveSheet.Range("D26")
Tb102.Value = Format(ActiveSheet.Range("E26"), "0.000")
Tb103.Value = ActiveSheet.Range("B27")
Tb104.Value = ActiveSheet.Range("C27")
Tb105.Value = ActiveSheet.Range("D27")
Tb106.Value = Format(ActiveSheet.Range("E27"), "0.000")
End Sub

the Activesheet info starts at row5 - ends at row 30 -- columns B thru E
what would I need to add to above code where in col E I need to find the
highest number and the insert the whole row B thru E into Row 26 then find
the second highest number and insert that row into B27 -- the final criteria
being that before the highest and second highest number are chosen they must
have the number 14 in row F - therefore if the highest number had 13 or less
in col F it would be ignored the same applying to the second highest number.






--
Many Thanks

Sue
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Userform sorting data

OOOp's typo error info ends Row 25 not 30 in previous post
--
Many Thanks

Sue


"Sue" wrote:

Hi Experts

Small problem for you for me its difficult -- the command button - code below
Private Sub Add1_Click()
Tb99.Value = ActiveSheet.Range("B26")
Tb100.Value = ActiveSheet.Range("C26")
Tb101.Value = ActiveSheet.Range("D26")
Tb102.Value = Format(ActiveSheet.Range("E26"), "0.000")
Tb103.Value = ActiveSheet.Range("B27")
Tb104.Value = ActiveSheet.Range("C27")
Tb105.Value = ActiveSheet.Range("D27")
Tb106.Value = Format(ActiveSheet.Range("E27"), "0.000")
End Sub

the Activesheet info starts at row5 - ends at row 30 -- columns B thru E
what would I need to add to above code where in col E I need to find the
highest number and the insert the whole row B thru E into Row 26 then find
the second highest number and insert that row into B27 -- the final criteria
being that before the highest and second highest number are chosen they must
have the number 14 in row F - therefore if the highest number had 13 or less
in col F it would be ignored the same applying to the second highest number.






--
Many Thanks

Sue

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Userform sorting data

Finding the first 2 numbers is not difficult you can either use a combination
of MAX and LARGE functions or two iterations of LARGE, but your final
criteria is really hard to understand. Before choosing the 2 numbers,
"theymust have the number 14 in row F"?
F is not a row is a column.
Should the number have a 14 prefix or somewhere in between?
I think you should copy and paste a sample of the data, to get you a
complete answer.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Sue" wrote:

OOOp's typo error info ends Row 25 not 30 in previous post
--
Many Thanks

Sue


"Sue" wrote:

Hi Experts

Small problem for you for me its difficult -- the command button - code below
Private Sub Add1_Click()
Tb99.Value = ActiveSheet.Range("B26")
Tb100.Value = ActiveSheet.Range("C26")
Tb101.Value = ActiveSheet.Range("D26")
Tb102.Value = Format(ActiveSheet.Range("E26"), "0.000")
Tb103.Value = ActiveSheet.Range("B27")
Tb104.Value = ActiveSheet.Range("C27")
Tb105.Value = ActiveSheet.Range("D27")
Tb106.Value = Format(ActiveSheet.Range("E27"), "0.000")
End Sub

the Activesheet info starts at row5 - ends at row 30 -- columns B thru E
what would I need to add to above code where in col E I need to find the
highest number and the insert the whole row B thru E into Row 26 then find
the second highest number and insert that row into B27 -- the final criteria
being that before the highest and second highest number are chosen they must
have the number 14 in row F - therefore if the highest number had 13 or less
in col F it would be ignored the same applying to the second highest number.






--
Many Thanks

Sue

  #4   Report Post  
Posted to microsoft.public.excel.programming
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Userform sorting data

Hi Michael

it is Col "F" not row must be getting "old timers disease"
--
Many Thanks

Sue


"Michael" wrote:

Finding the first 2 numbers is not difficult you can either use a combination
of MAX and LARGE functions or two iterations of LARGE, but your final
criteria is really hard to understand. Before choosing the 2 numbers,
"theymust have the number 14 in row F"?
F is not a row is a column.
Should the number have a 14 prefix or somewhere in between?
I think you should copy and paste a sample of the data, to get you a
complete answer.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Sue" wrote:

OOOp's typo error info ends Row 25 not 30 in previous post
--
Many Thanks

Sue


"Sue" wrote:

Hi Experts

Small problem for you for me its difficult -- the command button - code below
Private Sub Add1_Click()
Tb99.Value = ActiveSheet.Range("B26")
Tb100.Value = ActiveSheet.Range("C26")
Tb101.Value = ActiveSheet.Range("D26")
Tb102.Value = Format(ActiveSheet.Range("E26"), "0.000")
Tb103.Value = ActiveSheet.Range("B27")
Tb104.Value = ActiveSheet.Range("C27")
Tb105.Value = ActiveSheet.Range("D27")
Tb106.Value = Format(ActiveSheet.Range("E27"), "0.000")
End Sub

the Activesheet info starts at row5 - ends at row 30 -- columns B thru E
what would I need to add to above code where in col E I need to find the
highest number and the insert the whole row B thru E into Row 26 then find
the second highest number and insert that row into B27 -- the final criteria
being that before the highest and second highest number are chosen they must
have the number 14 in row F - therefore if the highest number had 13 or less
in col F it would be ignored the same applying to the second highest number.






--
Many Thanks

Sue

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Userform sorting data

Please post a sample of your data.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Sue" wrote:

Hi Michael

it is Col "F" not row must be getting "old timers disease"
--
Many Thanks

Sue


"Michael" wrote:

Finding the first 2 numbers is not difficult you can either use a combination
of MAX and LARGE functions or two iterations of LARGE, but your final
criteria is really hard to understand. Before choosing the 2 numbers,
"theymust have the number 14 in row F"?
F is not a row is a column.
Should the number have a 14 prefix or somewhere in between?
I think you should copy and paste a sample of the data, to get you a
complete answer.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Sue" wrote:

OOOp's typo error info ends Row 25 not 30 in previous post
--
Many Thanks

Sue


"Sue" wrote:

Hi Experts

Small problem for you for me its difficult -- the command button - code below
Private Sub Add1_Click()
Tb99.Value = ActiveSheet.Range("B26")
Tb100.Value = ActiveSheet.Range("C26")
Tb101.Value = ActiveSheet.Range("D26")
Tb102.Value = Format(ActiveSheet.Range("E26"), "0.000")
Tb103.Value = ActiveSheet.Range("B27")
Tb104.Value = ActiveSheet.Range("C27")
Tb105.Value = ActiveSheet.Range("D27")
Tb106.Value = Format(ActiveSheet.Range("E27"), "0.000")
End Sub

the Activesheet info starts at row5 - ends at row 30 -- columns B thru E
what would I need to add to above code where in col E I need to find the
highest number and the insert the whole row B thru E into Row 26 then find
the second highest number and insert that row into B27 -- the final criteria
being that before the highest and second highest number are chosen they must
have the number 14 in row F - therefore if the highest number had 13 or less
in col F it would be ignored the same applying to the second highest number.






--
Many Thanks

Sue

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
Sorting data to match existing data Jack C Excel Discussion (Misc queries) 4 May 24th 06 09:48 AM
colors of bar charted data don't follow data after sorting Frankgjr Charts and Charting in Excel 2 January 17th 06 12:33 PM
Userform Textbox Sorting blacktour[_4_] Excel Programming 1 July 28th 05 03:41 PM
Validate data in userform data entry BernzG Excel Programming 4 June 1st 05 01:45 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM


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