Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've been using Excel for years, but am fairly new at VB. I need hel
with a macro i'm trying to create. I have text in one column that says one of six things: applied submitted, etc. In the column next to that, i have a number. I wan to move this information to different areas of the page based on wha it says. FOr example, if it says in column A: "applied", then i want t move the info in column B to Column C. If it says in Column A "Submitted", then i want the info in column B to Column D. Does thi make sense? Can anyone help? Should I be using some sort of if-the code? Thanks -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim bFnd as Boolean
do while activeCell < "" bFnd = False Select Case lcase(ActiveCell.Value) Case "applied" ActiveCell.offset(0,2).Value = ActiveCell.Offset(0,1).Value : bFnd = True Case "submitted" ActiveCell.offset(0,3).Value = ActiveCell.Offset(0,1).Value : bFnd = True End Select if bFnd then ActiveCell.Offset(0,1).ClearContents ActiveCell.offset(1,0).Select Loop lcase(activeCell.Value) sees the entry in ActiveCell as all lowercase, so in the case statement, the condition should be expressed as all lower case. Add your additional cases. -- Regards, Tom Ogilvy "ktpack " wrote in message ... I've been using Excel for years, but am fairly new at VB. I need help with a macro i'm trying to create. I have text in one column that says one of six things: applied, submitted, etc. In the column next to that, i have a number. I want to move this information to different areas of the page based on what it says. FOr example, if it says in column A: "applied", then i want to move the info in column B to Column C. If it says in Column A: "Submitted", then i want the info in column B to Column D. Does this make sense? Can anyone help? Should I be using some sort of if-then code? Thanks! --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
auth data not passed to "transferring file..." dialog | Excel Programming |