Re: Population Pyramids in Excel
Ok, thanks guys, that worked perfectly. Sorry for the late response, I just checked it.
Re: Population Pyramids in Excel
Ok, thanks guys, that worked perfectly. Sorry for the late response, I just checked it.
How could I make a population pyramid in excel without making the left values negative? A population pyramid is supposed to look like this: http://www12.statcan.ca/english/census01/teacher's_kit/images/activity4_chart2.jpg
If I put values in excel for both male and female populations, how can I make a chart to display the data like that?
Thanks,
Carlos
Re: [Shift] Arguments for Range.Delete()
Sure; I want to take an ActiveCell and delete it if its value is "-", shifting cells up whenever I do so. The final code should look like this.
Re: Testing for Cell Content
Ok thanks im using VBA but couldn't find the right function... thanks a lot
I need to write an IF function to determine if the ActiveCell's content is only numerical or something else. Does anybody know how to do this quickly and efficiently?
Re: one time use vba
Oh I understand now from quickoats' post. That is a pretty good way.
Re: one time use vba
Can you expand on exactly what you need? What do you mean deletes the message, like automatically clicks "OK"? What then would be the point of the program?
Re: Regular Expressions in VBA
Thanks Richie, that site really helped. I have another question though: I have only just started learning regex so it might be a stupid one, but... Do you know how I could turn a string into a regular expression pattern? More exactly, if I have a string
"6-methyl-5-hepten-2-one", how can I turn it into a regex withing VBA code to search just for "5-hepten-2-one" or something similar? Because I will have to do so for many such names.
Re: Regular Expressions in VBA
Oh sorry, by regex I meant Regular Expressions
Does anybody know a way to incorporate Regex in VBA code?
Re: Intra-workbook List Comparison
Hey, thanks Andy! That did the trick! Sorry for the late response, I just got back on a computer.
Re: Intra-workbook List Comparison
IWRK:
Thanks for responding to my post. I tried your find function, however, and I get a message:
Error '9':
Subscript out of range
which highlights the IF method inside the function. Any idea why this might be?
If you need a copy of the workbook, I would be glad to send it to you.
Re: USB printer in macro
Why don't you make a textbox to select the current port before the macro code is carried out? Then you could implement the selection in the code
Hi,
I have a chemical compounds database with 555 compounds in it, saved as Macros.xls in a worksheet named List . I need to make a macro that checks a new list in another workbook and highlights those compounds it found in the database.
I have started a tentative code structure and almost got it working, except for the Find method inside the Find function. Can somebody help me?
Sub CheckCompounds()
MsgBox "Make sure compound list is A1:Ax"
Dim temp As String
Cells(1, 1).Select
Do
temp = ActiveCell.Value
If Find(temp, "Macros", "List") = True Then
Selection.Interior.ColorIndex = 36
Selection.Interior.Patter = xlSolid
End If
ActiveCell.Offset(1, 0).Select
Loop While ActiveCell.Value > 0
End Sub
Function Find(text As String, book As String, sheet As String) As Boolean
Dim found As Boolean
If Workbooks(book).Worksheets(sheet).Cells.Find(What:=text, _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=MatchCase, _
SearchFormat:=False).Value > 0 Then found = True
End Function
Display More
I am trying to search the database for each string in the new list (which is vertical in the A column of a new sheet), and am considering any range returned by the Find() function with value > 0 to be a positive match. Apart from that, however, I am in dire need for help.
Can somebody come to my rescue?
PS. Both the database and the new workbook are in the same folder.