Open Side Menu Go to the Top
Register
Ask me anything about Microsoft Excel Ask me anything about Microsoft Excel

01-18-2011 , 02:13 PM
Had a problem a few days ago that I couldn't figure out

Table has columns

ID, Status, # of items, Special Project

I'm tracking items by the special project, so I need to generate a table and set of charts to view items that are in the special project, and items that aren't

I set up a pivot table with the following

Filter: Special Project (y/n)
Row Labels: Status
Values: Count of ID, Sum of # of Items

That presents the data mostly how I need it, but I can't get my charts working properly in it

I need 2 pie charts broken down by status. One shows Sum of # of items for each status, other one shows Count of IDs for each status.

When I create the pivot charts I am unable to select which series is displayed. it only shows whichever series comes first in the pivot table. This means I'd have to create a new pivot table for each of the 4 charts I want, instead of just one pivot table for each set of data for Project/Non-Project.

I got frustrated and ditched the pivot table in favor of sumifs and countifs but I know it must be possible with pivot tables/charts. Any ideas?
Ask me anything about Microsoft Excel Quote
01-18-2011 , 02:21 PM
This might be obvious but,

I've been making a lot of graphs lately comparing different football players stats, something like Column A = player's name, Column B = goals/shot and Column C = total shots where I graph Column B on the y-axis and Column C on the x-axis. I want to label the data points with the player's names but have been doing them manually because I can't get the data labels to say anything other than the y-value or x-value. So is there a way to get it to automatically connect the right name to the right data point or do I have to keep doing it manually?
Ask me anything about Microsoft Excel Quote
01-18-2011 , 03:31 PM
Quote:
Originally Posted by Freakin
I got frustrated and ditched the pivot table in favor of sumifs and countifs but I know it must be possible with pivot tables/charts. Any ideas?
Have you tried using pivot charts? you could create 4 of them and just set make them static rather than using them as actual pivot charts

Quote:
Originally Posted by kitaristi0
This might be obvious but,

I've been making a lot of graphs lately comparing different football players stats, something like Column A = player's name, Column B = goals/shot and Column C = total shots where I graph Column B on the y-axis and Column C on the x-axis. I want to label the data points with the player's names but have been doing them manually because I can't get the data labels to say anything other than the y-value or x-value. So is there a way to get it to automatically connect the right name to the right data point or do I have to keep doing it manually?
I don't quite get the value of this graph, what type of graph is it?

I've seen some dodgy workarounds for getting custom labels involving adding a 3rd column then setting the colour to invisible (or same as the background) and putting the label on that.. not sure if this is what you are after

Regarding the bolded, in general the answer to that question is always no
Ask me anything about Microsoft Excel Quote
01-18-2011 , 10:37 PM
Quote:
Originally Posted by zomg
Right click on the cell > Format > Number (set decimal places to 0), works fine for me

alternatively you can put an apostrophe in front i.e. '12345678998787 but i wouldn't recommend it
I've tried this, but when I enter lets say 16 digits in a cell, it turns the last digit to a zero automatically when I go on to the next cell.
Ask me anything about Microsoft Excel Quote
01-19-2011 , 04:34 AM
I want to develop an Excel based application to end consumers. Problem is that they then need Excel installed to use it.
What is your guess of how large % of average users have Excel currently installed?
And would you say that % differs for the average regular poker player?
Thanks
Ask me anything about Microsoft Excel Quote
01-19-2011 , 06:52 AM
Quote:
Originally Posted by zomg
I don't quite get the value of this graph, what type of graph is it?

I've seen some dodgy workarounds for getting custom labels involving adding a 3rd column then setting the colour to invisible (or same as the background) and putting the label on that.. not sure if this is what you are after

Regarding the bolded, in general the answer to that question is always no
The graphs look like this:



I have been editing the player's names manually onto the data points since when I go to Format Data Labels I only have Series Name, X Value and Y Value as options.
Ask me anything about Microsoft Excel Quote
02-07-2011 , 09:16 AM
I have a simple model with 2 inputs and single output. What I want to do is loop through the combinations of inputs say A 0-50 and B 20-100 and then plot this on a graph of AvsB only showing the points when the output is positive.

Any help would be apreciated.
Ask me anything about Microsoft Excel Quote
02-07-2011 , 10:35 AM
It's hard to say without knowing what type of graph you want but i would suggest running the macro below then going to the GraphData sheet and record yourself creating the chart you want (including editing title/colours etc etc) then either paste it here and i can help you or try get it to work based on what i've done.

1. Right click on a sheet tab > view code
2. On the far left, right click on VBA Project > Insert > Module
3. Paste the code below

Code:
Sub createGraph()
    Dim i, j
    Dim ws As Worksheet
    Dim modelWS As Worksheet
    Dim graphWS As Worksheet
    Dim cellA As Range
    Dim cellB As Range
    Dim outputCell As Range
    Dim upperA As Integer
    Dim lowerA As Integer
    Dim upperB As Integer
    Dim lowerB As Integer
    Dim cRow As Integer
    
    
    For Each ws In ThisWorkbook.Worksheets
        If ws.Name = "GraphData" Then
            Application.DisplayAlerts = False
                ws.Delete
            Application.DisplayAlerts = True
        End If
    Next ws
    
   
    Set graphWS = ThisWorkbook.Sheets.Add
    graphWS.Name = "GraphData"
    graphWS.Range("A1") = "A"
    graphWS.Range("B1") = "B"
    
    '''''''''' Change as necessary
    Set modelWS = ThisWorkbook.Sheets("Model")
    Set cellA = modelWS.Range("A1")
    Set cellB = modelWS.Range("A2")
    Set outputCell = modelWS.Range("A3")
    lowerA = 0
    upperA = 50
    lowerB = 20
    upperB = 100
    ''''''''''
    
    For i = lowerA To upperA
        For j = lowerB To upperB
            cellA = i
            cellB = j
            If outputCell > 0 Then
                cRow = graphWS.Range("A65000").End(xlUp).Row + 1
                graphWS.Range("A" & cRow) = i
                graphWS.Range("B" & cRow) = j
            End If
        Next j
    Next i
    
    Charts.Add
    ActiveChart.ChartType = xlXYScatter
    ActiveChart.SetSourceData Source:=graphWS.Range("A1:B" & cRow), PlotBy:=xlColumns
    ActiveChart.Location Where:=xlLocationAsObject, Name:=modelWS.Name
End Sub
Ask me anything about Microsoft Excel Quote
02-08-2011 , 10:55 AM
Thanks for that, it really helped. The rest of the thread has been pretty useful as well
Ask me anything about Microsoft Excel Quote
02-23-2011 , 08:23 AM
Not sure if this thread is still going, but does anyone know how to lose conditional formatting but retain the effects? I have a sheet with 2000 rows and about 50 cols and it's getting slow with conditional formatting being applied to every other row, so I'd like to paste value but not lose the highlighting etc.

(I did do a Google, but the coding I found there doesn't seem to work. Not sure if it's because I'm using Office 2007 and the coding was a few years old.)
Ask me anything about Microsoft Excel Quote
03-06-2011 , 12:15 PM
Hello,

I need to replace various characters, that are located between two special characters.

Example:
Column A has the following:
Sports & Outdoors:Hunting:Knives -- I need to replace anything between the two ":". So, on this line I need to replace ":Hunting:" with ":". I need it to look like this -- Sports & Outdoors:Knives

The characters between the two ":" changes every few lines, so I can't just take "=TRIM(SUBSTITUTE(A1,":Hunting:",":"))" and run it all the way down.

I'd like to know if there is a formula that can be written to remove anything between the two ":" and replace it with just ":".

Thanks in advance...
Ask me anything about Microsoft Excel Quote
03-06-2011 , 04:20 PM
Quote:
Originally Posted by shizant
Hello,

I need to replace various characters, that are located between two special characters.

Example:
Column A has the following:
Sports & Outdoors:Hunting:Knives -- I need to replace anything between the two ":". So, on this line I need to replace ":Hunting:" with ":". I need it to look like this -- Sports & Outdoors:Knives

The characters between the two ":" changes every few lines, so I can't just take "=TRIM(SUBSTITUTE(A1,":Hunting:",":"))" and run it all the way down.

I'd like to know if there is a formula that can be written to remove anything between the two ":" and replace it with just ":".

Thanks in advance...
What about this:

Code:
=LEFT(A1,FIND(":",A1))&RIGHT(A1,LEN(A1)-FIND(":",A1,FIND(":",A1)+1))
Ask me anything about Microsoft Excel Quote
03-06-2011 , 04:35 PM
Quote:
Originally Posted by CopTHIS
Not sure if this thread is still going, but does anyone know how to lose conditional formatting but retain the effects? I have a sheet with 2000 rows and about 50 cols and it's getting slow with conditional formatting being applied to every other row, so I'd like to paste value but not lose the highlighting etc.

(I did do a Google, but the coding I found there doesn't seem to work. Not sure if it's because I'm using Office 2007 and the coding was a few years old.)
Sorry, never saw this.

I don't think it's possible, you can copy and paste into word then paste back and it will lose the conditional formatting but i'm not sure you can do it in excel.

I've done some vba in word but it's really messy although in theory you could probably write a macro in excel that copies a small range of the whole table into word then pastes it back into excel and moves through the whole table
Ask me anything about Microsoft Excel Quote
03-07-2011 , 10:02 AM
ok, so i couldn't tell if this was addressed in any of the posts.

I need to record daily inventory in Excel, currently 12 values for each day. I don't want to mess with the numbers more than once(i don't want to mess with them at all, i want to allow the people who generate the number to just input them into a Blank form).

So, how do i get Excel to record values for today without overwriting or changing values already on the spreadsheet. Also, through the weekend the numbers will not be input, on Monday 3 sets of values will be input.
Ask me anything about Microsoft Excel Quote
03-08-2011 , 05:51 AM
Quote:
Originally Posted by zomg
Sorry, never saw this.

I don't think it's possible, you can copy and paste into word then paste back and it will lose the conditional formatting but i'm not sure you can do it in excel.

I've done some vba in word but it's really messy although in theory you could probably write a macro in excel that copies a small range of the whole table into word then pastes it back into excel and moves through the whole table
Thanks, after surfing around in Google I came to the conclusion that it wasn't possible without enormous hassle. It's just annoying that you can't pick up the format after the conditioning in VB. I had to re-create the conditions and run a macro to have the same effect - it was just too much data to copy and paste out of Excel and then back in again.
Ask me anything about Microsoft Excel Quote
03-08-2011 , 07:42 AM
I used Excel03 a bunch in a finance job 2-3 years ago and would like to do some training to refresh my skills somewhat.

Im not sure what businesses are using as standard these days but im guessing 03 will probably still be standard(maybe not?). How big is the difference between 03 -> 07-> 10? If i did a bunch of training in 10 would i have difficulty going back to 03? Which would you recommend?

Thanks!
Ask me anything about Microsoft Excel Quote
03-08-2011 , 05:34 PM
Quote:
Originally Posted by ZDAR
I used Excel03 a bunch in a finance job 2-3 years ago and would like to do some training to refresh my skills somewhat.

Im not sure what businesses are using as standard these days but im guessing 03 will probably still be standard(maybe not?). How big is the difference between 03 -> 07-> 10? If i did a bunch of training in 10 would i have difficulty going back to 03? Which would you recommend?

Thanks!

I touched on this much earlier in the thread

Quote:
Most of my original work was done in 2003, and all my clients were using it. This in itself is amazing because this list includes 3 of the biggest government service providers in australia and a couple of billion dollar fund management firms.

I have only recently made the switch to 2007, at first I hated every second of it and to some extent I still do. The ribbon is the most confusing thing to use when you are used to the standard file menu.

Most of my work is done in VBA and to that level i haven't noticed a great level of change (especially because most of the new functions i won't use because it will break if you open it in 2003)

The biggest changes are the massive increase in rows (from 65536 to 1mil+) and columns. One of my biggest clients was on 2003 until a few months ago and had several 65000 row work books that they use as databases despite me trying to move them off excel

I also love the new conditional formatting rules which allow you much more freedom than in older versions. Previously if you wanted more than 3 conditions on a single cell you had to write a VBA module to handle it. This also required using the on_change module which i'm not a big fan of messing with because i do a lot of template work which combines thousands of duplicate spreadsheets and if there are macros running on each spreadsheet it considerably slows down the whole process.
I do very little work in 03 now and hate switching back to it, i would definitely recommend using 2007+

Regarding 2007 to 2010 you won't notice many changes here's a link with all the changes and you can see most (all?) probably won't affect you.
Ask me anything about Microsoft Excel Quote
03-08-2011 , 05:37 PM
Quote:
Originally Posted by wisski
ok, so i couldn't tell if this was addressed in any of the posts.

I need to record daily inventory in Excel, currently 12 values for each day. I don't want to mess with the numbers more than once(i don't want to mess with them at all, i want to allow the people who generate the number to just input them into a Blank form).

So, how do i get Excel to record values for today without overwriting or changing values already on the spreadsheet. Also, through the weekend the numbers will not be input, on Monday 3 sets of values will be input.
Hard to say without seeing the sheet, can you post a screenshot? I'm picturing each row having a date followed by 12 numbers..

You could make a form in vba and lock the spreadsheet then on_open show the form and update the values if there is no value for todays date
Ask me anything about Microsoft Excel Quote
03-16-2011 , 11:37 AM
Quote:
Originally Posted by zomg
Hard to say without seeing the sheet, can you post a screenshot? I'm picturing each row having a date followed by 12 numbers..

You could make a form in vba and lock the spreadsheet then on_open show the form and update the values if there is no value for todays date
ok, so the problem is that i can get my script below to copy my range to my designated worksheet, and save it but i can't make it do individual cells to individual rows.

Basically i'm trying to make it as simple as possible for the people who input these numbers. They already have a form they input the numbers into, but it's not linear, and they input into 5~6 different cells not in common row's or columns.


I want a "Send to XXXX worksheet" Button, that when clicked will copy/paste the numbers into the next empty row in it's respective column.

I have MSN and can probably get other forms of communication if you think it'd be easier to handle that way
Code:
Sub Copy_To_Another_Workbook()
    Dim SourceRange As Range
    Dim DestRange As Range
    Dim DestWB As Workbook
    Dim DestSh As Worksheet
    Dim Lr As Long

    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With
    If bIsBookOpen_RB("current worksheet") Then
        Set DestWB = Workbooks("Current worksheet")
    Else
        Set DestWB = Workbooks.Open("target workshee")
    End If
    Set SourceRange = ThisWorkbook.Sheets("Sheet1").Range("A2:D2")
    Set DestSh = DestWB.Worksheets("Grains recieving Daily")
    Lr = LastRow(DestSh)
    Set DestRange = DestSh.Range("A" & Lr + 1)
    With SourceRange
        Set DestRange = DestRange.Resize(.Rows.Count, .Columns.Count)
    End With
    DestRange.Value = SourceRange.Value

    DestWB.Close savechanges:=True

    With Application
        .ScreenUpdating = True
        .EnableEvents = True
    End With
End Sub
Function LastRow(sh As Worksheet)
    On Error Resume Next
    LastRow = DestSheet.Cells(Rows.Count, "A").End(xlDown).Row
    On Error GoTo 0
End Function


Function LastCol(sh As Worksheet)
    On Error Resume Next
    LastCol = sh.Cells.Find(What:="*", _
                            After:=sh.Range("A1"), _
                            Lookat:=xlPart, _
                            LookIn:=xlFormulas, _
                            SearchOrder:=xlByColumns, _
                            SearchDirection:=xlPrevious, _
                            MatchCase:=False).Column
    On Error GoTo 0
End Function
Ask me anything about Microsoft Excel Quote
03-17-2011 , 05:00 PM
Rather than the lastRow and lastCol functions you can do


LR = destsheet.range("A65000").end(xlup).row
destSheet.range("A" & LR + 1) = forms!formname.fieldname

LC = destsh.range("IV1").end(xltoleft).column
destSheet.cells(LR + 1,LC + 1) = "blah"
Ask me anything about Microsoft Excel Quote
03-23-2011 , 12:14 AM
I don't know anything beyond basic info on Excel so this probably isn't possible so bear with me.

Is it possible for an Excel file to keep an auto-updated tally for me on the number of files I have in a set of folders? I have .doc files in a bunch of folders and I'd like to be able to keep a single Excel spreadsheet that auto updates whenever I delete/add the .docs to the folders. I realize this is asking for Excel to compile information from outside Excel so it's probably not gonna happen, but I felt like I should try and ask.

Thanks.
Ask me anything about Microsoft Excel Quote
03-23-2011 , 03:34 AM
How do you mirror a cell in one worksheet to another worksheet. If I have worksheet A & B and I want a cell in A mirrored in B I know about the copy the cell in A then link to a cell in B method. Only issue is then I can only change the number in A for both cells to be consistent...not the other way around.

If I were to change the cell in worksheet B I want it to then change automatically in worksheet A as well and vica versa. Not only one way. Does that make sense?
Ask me anything about Microsoft Excel Quote
03-23-2011 , 06:20 AM
Quote:
Originally Posted by RoyaltyFree
How do you mirror a cell in one worksheet to another worksheet. If I have worksheet A & B and I want a cell in A mirrored in B I know about the copy the cell in A then link to a cell in B method. Only issue is then I can only change the number in A for both cells to be consistent...not the other way around.

If I were to change the cell in worksheet B I want it to then change automatically in worksheet A as well and vica versa. Not only one way. Does that make sense?
You'd need a macro I think. What you would really want is a simple macro that runs when you are in one of the cells and then press return - I'm not sure if that event can act as a trigger but others may know. Otherwise you'd have to click on a button or assign key stokes to run it.
Ask me anything about Microsoft Excel Quote
03-23-2011 , 05:22 PM
Quote:
Originally Posted by Phresh
I don't know anything beyond basic info on Excel so this probably isn't possible so bear with me.

Is it possible for an Excel file to keep an auto-updated tally for me on the number of files I have in a set of folders? I have .doc files in a bunch of folders and I'd like to be able to keep a single Excel spreadsheet that auto updates whenever I delete/add the .docs to the folders. I realize this is asking for Excel to compile information from outside Excel so it's probably not gonna happen, but I felt like I should try and ask.

Thanks.
Definitely do-able, depends what version of excel you are using. They changed the way of handling files in 2007+ so let me know if you are using 2007+ or an older version and i can whip something up for you.

Quote:
Originally Posted by RoyaltyFree
How do you mirror a cell in one worksheet to another worksheet. If I have worksheet A & B and I want a cell in A mirrored in B I know about the copy the cell in A then link to a cell in B method. Only issue is then I can only change the number in A for both cells to be consistent...not the other way around.

If I were to change the cell in worksheet B I want it to then change automatically in worksheet A as well and vica versa. Not only one way. Does that make sense?
As mentioned, you would need a macro on the worksheet_change function, right click on the sheet tab and go view code then paste:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$1" Then
        otherwbpath = "c:\newworkbook.xls"
        Set tmpWB = Workbooks.Open(otherwbpath)
        tmpWB.Sheets("sheet1").Range("a1") = Target.Value
        tmpWB.Close savechanges:=True
    End If
End Sub
i just wrote that free hand but it should be pretty close
Ask me anything about Microsoft Excel Quote
03-23-2011 , 05:49 PM
I'm just starting in my new job where I have to do a butt load of complex financial modeling, and need to learn VBA. Where do you think is a good start to learning VBA since I'd rather learn it then come here (or the MS Excel Forums) every time I have an issue... thanks,
Ask me anything about Microsoft Excel Quote

      
m