Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2024, 10:47 AM
massimodfd massimodfd is offline Using cells data greater than xx - graph Excel Windows XP Using cells data greater than xx - graph Excel Office 2010 32bit
Novice
Using cells data greater than xx - graph Excel
 
Join Date: Jan 2015
Posts: 29
massimodfd is on a distinguished road
Default Using cells data greater than xx - graph Excel


Hallo!
Is it possible to select data greater than "14" in the column J for creating a graph?
The column J has data that can vary from 0 to 30 but I would like to consider only data greater than 14, and the corresponding value in the column M
Hope I was clear...
Thanks!
Reply With Quote
  #2  
Old 10-13-2024, 01:53 PM
Logit Logit is offline Using cells data greater than xx - graph Excel Windows 10 Using cells data greater than xx - graph Excel Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

the following will graph data in column J.

I don't understand what you mean by :

Quote:
and the corresponding value in the column M

Code:
Option Explicit

Sub y()
 Application.ScreenUpdating = False
 Worksheets("Sheet1").Range("J2").AutoFilter _
 Field:=1, _
 Criteria1:=">" & "14"   ', _

 Dim Sorce, Targt As Worksheet
    Set Sorce = ThisWorkbook.Sheets("Sheet1")
    Set Targt = ThisWorkbook.Sheets("Sheet2")

    Sorce.Range("J2:J100").SpecialCells(xlCellTypeVisible).Copy
    Targt.Cells(1, 1).PasteSpecial
    Sheets("Sheet2").Activate
    Sheets("Sheet2").Range("A1").Select
    Macro1
   
    
    Range("A1").Select
    Application.CutCopyMode = False
    Application.Wait Now + #12:00:02 AM#
    
Sheets("Sheet1").Activate
Range("A1").Select

 On Error Resume Next
'If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData

'If ActiveSheet.AutoFilterMode Then ActiveSheet.ShowAllData
Cells.AutoFilter
Application.ScreenUpdating = True

End Sub

Sub Macro1()
'
' Macro1 Macro
'

'
    ActiveSheet.Shapes.AddChart.Select
    Dim rng As Range
   
    Dim cht As Object
    Dim LastRow As Long
    
    LastRow = Cells(Rows.Count, "A").End(xlUp).Row
    
    Set rng = ActiveSheet.Range("A1:A" & LastRow)
    'rng.Select

    ActiveChart.SetSourceData Source:=rng
    ActiveChart.ChartType = xlColumnClustered
End Sub
Attached Files
File Type: xlsm Book1.xlsm (21.6 KB, 5 views)
Reply With Quote
  #3  
Old 10-13-2024, 03:14 PM
p45cal's Avatar
p45cal p45cal is offline Using cells data greater than xx - graph Excel Windows 10 Using cells data greater than xx - graph Excel Office 2021
Expert
 
Join Date: Apr 2014
Posts: 948
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Another 2 ways in the attached:
On Sheet1, an Autofilter has been applied to column J to keep only rows where the value is greater than 14
On Sheet2, the number 14 has been entered in cell L1. This number is used in the formulae in the cells in column K, to show the number in column J if it's greater than the value in cell L1 or #N/A if it's not. It's this column K which is plotted.
Attached Files
File Type: xlsx msofficeforums52909.xlsx (21.4 KB, 4 views)
Reply With Quote
  #4  
Old 10-14-2024, 05:48 AM
massimodfd massimodfd is offline Using cells data greater than xx - graph Excel Windows XP Using cells data greater than xx - graph Excel Office 2010 32bit
Novice
Using cells data greater than xx - graph Excel
 
Join Date: Jan 2015
Posts: 29
massimodfd is on a distinguished road
Default

Thanks to all, I appreciate so much!
solution on sheet2 seems to be more easy for me to work with.
Attached the table with some more data, could you pls check it ?

Thanks!
Attached Files
File Type: xlsx msofficeforums52909 01.xlsx (23.0 KB, 6 views)
Reply With Quote
  #5  
Old 10-14-2024, 09:17 AM
Logit Logit is offline Using cells data greater than xx - graph Excel Windows 10 Using cells data greater than xx - graph Excel Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Based on your last posted workbook (Post #4) the following functions as desired here :

Code:
Option Explicit

Sub FiltrCols()
Dim lrow  As Long
Dim piece
Worksheets("Sheet2").Range("L2").AutoFilter _
    Field:=2, _
    Criteria1:=">" & "14"
Application.ScreenUpdating = False
    Dim Sorce, Targt As Worksheet
    
    
    Sheets("Sheet3").UsedRange.Delete
    
    '##delete old chart (if exists) from sheet
    If Sheets("Sheet3").ChartObjects.Count > 0 Then
        Sheets("Sheet3").ChartObjects(1).Delete
    End If

lrow = Range("L16").End(xlUp).Row
    For Each piece In Array("L2:L16", "M2:M16")
         Range(piece).Copy
        
        With Sheet3.Range(piece).Offset(0, -11)
            .PasteSpecial
            .PasteSpecial xlPasteValues
        End With
        
    Next
    
Sheet3.Rows(1).EntireRow.Delete

Create_Chart_Variable_Rows_NEW

Application.CutCopyMode = False

Sheets("Sheet3").Activate

    
    Sheets("Sheet3").Range("A1").Select
    
    
    
    
   
    
    Range("A1").Select
    Application.CutCopyMode = False
    
    Sheets("Sheet2").Activate
    Range("A1").Select
    
     On Error Resume Next
    
    Cells.AutoFilter
    Application.ScreenUpdating = True
    
    MsgBox "Done !"
 
End Sub

Sub Create_Chart_Variable_Rows_NEW()

'

On Error Resume Next

     Dim ws As Worksheet
     Set ws = Sheets("Sheet3")
     Dim rng As Range
     Dim objChrt As ChartObject
     Dim chrt As Chart
'

Dim r As Long
   r = ws.Cells(Rows.Count, "A").End(xlUp).Row

'

     With ws

        Set rng = .Range("A1:A" & r & ",B1:B" & r)

         .Shapes.AddChart
         Set objChrt = .ChartObjects(.ChartObjects.Count)
         Set chrt = objChrt.Chart

         With chrt
             .ChartType = xlColumnClustered
             .SetSourceData Source:=rng
         End With
     End With

End Sub
Also there were a few errors in formatting the DATE columns data. I ran the data through the ERROR CHECKING and updated to the correct format.
Attached Files
File Type: xlsm msofficeforums52909 01 (1).xlsm (35.7 KB, 3 views)
Reply With Quote
  #6  
Old 10-14-2024, 10:16 AM
p45cal's Avatar
p45cal p45cal is offline Using cells data greater than xx - graph Excel Windows 10 Using cells data greater than xx - graph Excel Office 2021
Expert
 
Join Date: Apr 2014
Posts: 948
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by massimodfd View Post
Attached the table with some more data, could you pls check it ?
See attached Sheet2. Also Sheet1 tweaked using the other method.
Attached Files
File Type: xlsx msofficeforums52909 01a.xlsx (23.5 KB, 5 views)
Reply With Quote
  #7  
Old 10-14-2024, 12:44 PM
massimodfd massimodfd is offline Using cells data greater than xx - graph Excel Windows XP Using cells data greater than xx - graph Excel Office 2010 32bit
Novice
Using cells data greater than xx - graph Excel
 
Join Date: Jan 2015
Posts: 29
massimodfd is on a distinguished road
Default

Thank you Logit, but for my purposes it is easier the solution Sheet 2 from p45cal.
Could the graph in sheet 2 be done with a line instaed of ponts?

Thank you !
Reply With Quote
  #8  
Old 10-14-2024, 01:11 PM
p45cal's Avatar
p45cal p45cal is offline Using cells data greater than xx - graph Excel Windows 10 Using cells data greater than xx - graph Excel Office 2021
Expert
 
Join Date: Apr 2014
Posts: 948
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by massimodfd View Post
Could the graph in sheet 2 be done with a line instaed of ponts?
As follows:2024-10-14_210858.jpg


or:


2024-10-14_211223.jpg
Reply With Quote
  #9  
Old 10-15-2024, 03:10 AM
massimodfd massimodfd is offline Using cells data greater than xx - graph Excel Windows XP Using cells data greater than xx - graph Excel Office 2010 32bit
Novice
Using cells data greater than xx - graph Excel
 
Join Date: Jan 2015
Posts: 29
massimodfd is on a distinguished road
Default

Good! Thanks a lot!

.... can we make appear on X-axis only the values in the column, 15,4 - 17,8 - 19 - 21,5 - 22,1 - 33,4 instead of 5-10-15-20....
Thanks!
Reply With Quote
  #10  
Old 10-15-2024, 01:11 PM
p45cal's Avatar
p45cal p45cal is offline Using cells data greater than xx - graph Excel Windows 10 Using cells data greater than xx - graph Excel Office 2021
Expert
 
Join Date: Apr 2014
Posts: 948
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by massimodfd View Post
... can we make appear on X-axis only the values in the column, 15,4 - 17,8 - 19 - 21,5 - 22,1 - 33,4 instead of 5-10-15-20....
Thanks!:D
With difficulty (if at all).
Does the chart at cell M25 of Sheet2 do anything for you?
Attached Files
File Type: xlsx msofficeforums52909 01b.xlsx (32.1 KB, 4 views)
Reply With Quote
  #11  
Old 10-16-2024, 11:28 AM
massimodfd massimodfd is offline Using cells data greater than xx - graph Excel Windows XP Using cells data greater than xx - graph Excel Office 2010 32bit
Novice
Using cells data greater than xx - graph Excel
 
Join Date: Jan 2015
Posts: 29
massimodfd is on a distinguished road
Default

Thanks a lot! I will use a graph "dispersion x,y" that best fits to my purposes.
In fact I need to have along X axis the increasing values and I realized that only this graph can fulfill the purpose.
I want to thank you for your time, very kind ! I have learned so much!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a report with a graph showing data from diferent updates/status data MikelZU Project 1 04-30-2021 12:19 AM
Formula to deduct a figure the sum of two cells is equal to or greater than a certain valu AlanBird Excel 3 11-25-2017 03:11 PM
Using cells data greater than xx - graph Excel Auto update excel graph range, ignore data when date reads 00-Month-00 SavGDK Excel 2 06-24-2016 08:05 AM
Need help with excel formula greater than.. bm868 Excel 2 01-02-2016 10:29 AM
How to create a column graph from row data in excel jyfuller Excel 0 07-02-2013 05:07 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft