|
Your donations keep RPGWatch running!
Microsoft Excel noob needs some help
September 21st, 2014, 23:39
Hello everyone!
I'm currently cataloging my collection of vinyl records and I'd like to add a few features via a formula in Excel, which I'm pretty sure I can do.
Basically, I want to tally up the number of records I've sold in my collection (their boxes are filled with the color red), and also tally up the records that I've archived (these are denoted by having their name in italics.
So, I haven't the first clue what to do, except I know it has something to do with creating a formula…
Can someone spell it out in dummy terms what exactly I need to do to get this to work? I'm using 2007 Excel. Thanks in advance.
- Fluent
I'm currently cataloging my collection of vinyl records and I'd like to add a few features via a formula in Excel, which I'm pretty sure I can do.
Basically, I want to tally up the number of records I've sold in my collection (their boxes are filled with the color red), and also tally up the records that I've archived (these are denoted by having their name in italics.
So, I haven't the first clue what to do, except I know it has something to do with creating a formula…
Can someone spell it out in dummy terms what exactly I need to do to get this to work? I'm using 2007 Excel. Thanks in advance.
- Fluent
Guest
September 22nd, 2014, 00:14
Code:
'Counts the cells in Italic in the current selection
Sub CountItalic()
Dim i As Integer
Dim cell As Range
i = 0
For Each cell In Selection
If cell.Value <> "" And cell.Font.Italic = True Then
i = i + 1
End If
Next
MsgBox "Cells in Italic:" & Str$(i)
End Sub
Similar for cells in red:
Code:
'Counts the cells in red in the current selection
Sub CountRed()
Dim i As Integer
Dim cell As Range
Const cRed = 3
i = 0
For Each cell In Selection
If cell.Value <> "" And cell.Interior.ColorIndex = cRed Then
i = i + 1
End If
Next
MsgBox "Cells in red:" & Str$(i)
End Sub
Last edited by HiddenX; September 22nd, 2014 at 00:27.
September 22nd, 2014, 00:47
HiddenX, how did I know you would respond
. Thanks!!
I'm not sure how to add this macro, though. Can you give me instructions from start to finish please?
Edit - and will this macro update itself as I add more LPs?
. Thanks!!I'm not sure how to add this macro, though. Can you give me instructions from start to finish please?
Edit - and will this macro update itself as I add more LPs?
Guest
September 22nd, 2014, 00:55
Okay I figured out how to add a macro but it doesn't seem to be doing anything…Again, more information is needed to better understand what to do , thanks.
Guest
September 22nd, 2014, 01:02
These macros work like this:
Mark the range of cells you want to evaluate with your mouse. Let's say A1 to A100
and then you can run the macros.
They will pop up with a message dialog.
Getting Started with VBA in Excel 2010
Look in Fluent.xlsm for Examples (it's zipped)
Mark the range of cells you want to evaluate with your mouse. Let's say A1 to A100
and then you can run the macros.
They will pop up with a message dialog.
Getting Started with VBA in Excel 2010
Look in Fluent.xlsm for Examples (it's zipped)
September 22nd, 2014, 01:09
It works in your zipped file but not in my document. Do I have to record the macro first? It just seems to do nothing when I click "Run" on the macro after I've created it…
Guest
September 22nd, 2014, 01:13
Instead of a macro isn't there some kind of formula I can use that will automatically tally everything up without running a macro? I'd like to have a few columns set up specifically to record this data and I don't want to have to remember to run the macro every time I make changes in the document…
Do you know of a formula that could do these 2 things?
Do you know of a formula that could do these 2 things?
Guest
September 22nd, 2014, 01:15
You have to copy the macros to your Excel file, or you create a personal.xlsb file and copy the macros to this file.
All macros in a personal.xlsb file can be used in all other sheets.
All macros in a personal.xlsb file can be used in all other sheets.
September 22nd, 2014, 01:22
Backcolor and Italic cannot be so good evaluated with formulas. Sorry. VBA is the better way to go.
I've seen a more complicated formula for backcolor evaluations.
I've seen a more complicated formula for backcolor evaluations.
September 22nd, 2014, 01:23
How do I copy the macros to my document? I see them open in the document you sent me but I can't copy them.
Guest
September 22nd, 2014, 01:25
Open the vba editor -> menu developer tools
create a new vba module
copy the macros with copy/paste
create a new vba module
copy the macros with copy/paste
September 22nd, 2014, 01:36
Confusing, but I think I got it working, although I couldn't figure out VBA and modules and all that, but as long as I open the file you sent me along with my list, I can use the macros freely.
Thanks for the help!
Thanks for the help!
Guest
September 22nd, 2014, 13:51
I suggest you add a column sold and a column archived.
You then just fill in yes or no.
Then at the top you can have a formula
=countif(range,"yes")
You then just fill in yes or no.
Then at the top you can have a formula
=countif(range,"yes")
September 22nd, 2014, 16:21
Already done 
BTW: The solution from Pladio is easier for people with no VBA skills

BTW: The solution from Pladio is easier for people with no VBA skills
September 22nd, 2014, 19:44
Originally Posted by HiddenXYeah, when I realised from Fluent's response that he was having trouble with the VBA part, I thought offering a more standard solution would be more useful to him
Already done
BTW: The solution from Pladio is easier for people with no VBA skills

Fluent, if you want I could do it for you.
I'm quick with Excel … (It's part of my job - a bigger part than I sometimes would want it to be
)
| Thread Tools | Search this Thread |
|
|
All times are GMT +2. The time now is 10:10.
