If Cell Contains Word Then Assign Value
Jan 29, 2010
Basically I have columns A and columns B.
Column A contains a list of words
Column B is blank.
If a cell in column A contains a word like "univ", I want the number 1 to appear in the respective row in column 2.
If a cell in column A does not contain a word "univ", I want the number 0 to appear in the respective row in column 2.
View 14 Replies
ADVERTISEMENT
Jan 29, 2010
Basically I have columns A and columns B. Column A contains a list of words
Column B is blank. If a cell in column A contains a word like "univ", I want the number 1 to appear in the respective row in column 2. If a cell in column A does not contain a word "univ", I want the number 0 to appear in the respective row in column 2.
View 5 Replies
View Related
Aug 1, 2014
I have one workbook with 3 Sheets (Table1/Table2/Table3). In Table 3 are the following columns "Table1" and "Table2". I need one script which search in table1 and table2 the words from test1 to test15 and write the assign numbers in table 3 in the right columns / row! If one value is not found, this value should have the number 0 in table 3.
I have the following examples attached, file Mappe1_Test1.xlsx is the before status and Mappe1_Test.xlsx should be the after status.
View 3 Replies
View Related
Mar 24, 2012
In cell B77 i have a percentage formulated from other information in the sheet. I want cell B78 to show a word based on the percentage score.
As follows:
0%-25%- Poor
25%-50% - Competent
50%-75% - Professional
75%-100% - Expert
View 4 Replies
View Related
Oct 7, 2013
I have two files, a workbook and a document, and both are macro-enabled files. The workbook is my main file for my project and the document is my template. The workbook is basically my database with vba program that populate data to Word document. My word document is a template that has macros saved in a module. Aside from populating the data, workbook also create formfields on to the document and assign macro (ExitMacro).
However, i'm getting Run-time error (4210): Bad parameter message when i try to assign the macro to formfields. I noticed that this happened when the macro was saved in the module of the document. The workbook program works fine if the document macro was saved in Normal.dot, which i don't want to do.
View 3 Replies
View Related
Jul 6, 2009
Is it possible to export Excel cell contents to Word fields in a protected Word document? For example...
What code would be needed to tell Excel to open up, copy and export the contents of A2 in the active sheet of a workbook to "Field 2" in a Word document named "Report 01" and then put the contents of B2 to "Field 2" etc?
Do both applications have to be opened up at the same time or is Excel able to open up Word on its own? Will the macro be able to....
1. Automatically open up the correct Word document?
2. Look ONLY in a certain folder for the "Report 01" Word document?
or
Bring up a "selection" box that allows you to select the document you wish Excel to export it's data to?
3. Close and save the Word Document without any user intervention?
View 2 Replies
View Related
Feb 16, 2012
I need to count how many times the word Test is in the range B4:H9 with
Range N2 = Test the formula below works if Test is only in the cell once.
=COUNTIF($B$4:$H$9,"*" & N2 & "*")
But I have data in cells like below, this is all in one cell, so how would I have it count all the times test is in the range when some cells have test 2 or more times in a single cell?
5
Test
8am-2pm
Test
5pm-10pm
View 5 Replies
View Related
Jul 18, 2008
I have a bunch of cells in column b that have products.
Column B
Dell 24" lcd
vaio sony laptop
8.0 mpxl kodak camera
photoepsonprinter
Basically in Column A I want a formula that'll say.
If the word "dell" is somewhere in cell b1, then put the word "Dell" in cell a1.
If the word "sony" is somewhere in cell b1, then put the word "sony" in cell a1.
And then so on and so forth down through column A. The brand names are potentially endless, so is there a easy way to on like a seperate sheet make a list of brand names and have it pull from there?
Originally I made a if function that said if the brand name was contained in the cell then output the brand name, but that caps at 7 for the amount of brands i can use....
View 9 Replies
View Related
May 26, 2006
I have an excel program that is supposed to count word instances in a word document. I can't seem to find the right declaration for a word document.
For example to declare a workbook in excel its
Dim wb As Work Book
I've tried
Dim doc As Word.Document
'or
Dim doc As Word.Application
as shown in some of the forum posts, but an error user-type not defined keeps displaying.
View 2 Replies
View Related
Dec 29, 2009
Before unloading a userform the range to select the active cell is set to
View 3 Replies
View Related
Dec 10, 2013
I have excel 2010. I have a worksheet with formulas that refer to a labelled cell, and I want to change the location that they refer to. When I select the name in the Name Box and delete it or type another name it has no effect on the name of the cell.
View 2 Replies
View Related
Jul 21, 2009
I would like a to activate a form every time I click in a given cell. how to do this?
View 4 Replies
View Related
Mar 30, 2008
You can use VB to put a Range.Value or Range.Formula into a specific cell.
How do you assign a name to that Range using VB code?
View 6 Replies
View Related
Dec 30, 2008
I want to be able to "count" apples and oranges. Is there a way to record a particular text in a text formatted cell and count it. e.g. 10 cells, 3 say "apples", three say "oranges", 4 say "plums". I want excel to keep track of the three types of fruit when I change them and give me a running number of each.
View 2 Replies
View Related
Jul 1, 2014
There are 10 rows of data, and would like to assign value at the end of each row as "initiated" "In the process" "Needs to be Reviewed" "Completed", by using Buttons with different macros.
View 2 Replies
View Related
Nov 24, 2011
I can't work out how to strip the hyperlink address in cell rRecordID(1,11).
Code:
Private Function GetRecord(lRow As Long)
Dim i As Long
Dim vMyCopy As Variant
[Code].....
View 3 Replies
View Related
Sep 3, 2012
I have used a textbox ( not an activeX text box) to get input from user. I want to get that value into a cell.
View 3 Replies
View Related
Jun 30, 2013
What am I missing here. The following code fragment
strTestString = In_Wrksht.Range("A" & i)
strNameString = Trim(Mid(strTestString, 6))
Debug.Print strTestString & " uuu"
Debug.Print strNameString & " eee"
In_Wrksht.Range("B" & i) = strNameString & " XXX"
Debug.Print Trim(In_Wrksht.Range("B" & i)) & "ggg"
returns these results:
7/ 31 FIDELITY SHORT TERM BOND uuu
FIDELITY SHORT TERM BOND eee
ggg.
strNameString is not being assigned to B&i. Why Not?
View 9 Replies
View Related
May 20, 2014
I have a large spread sheet with cells that have manually been coloured - Red, Green, Blue, Yellow according to data throughout sheet. I want to conditionally format these cells instead of the manual work that has been done previously, so i was thinking if i could assign a value based on the current cell colour, then paste special and wipe the current colour scheme i would be able to conditionally format based on the new numeric data and colour code accordingly.
View 2 Replies
View Related
Jun 29, 2014
I am trying to make a macro that when clicked, will randomly choose one of 7 values and type that into cell C4. Values can be Dodgeball, Football, Soccer, Tetherball, Soccer, Baseball, Basketball. Is this doable?
View 9 Replies
View Related
Nov 11, 2006
Is it possible to write a macro in Book1 to assign Public Varibles in Book1 to values located in cells in Book2 without first opening Book2. So lets say in Book2, sheet1, cell B2 contains the number 5. I want Public Variable "Number_value" in Book1 to equal the number 5.
View 3 Replies
View Related
Jul 2, 2014
I'm a VBA beginner In my Excel worksheet, I have 1 column with data (column B). The data is in rows 5-250. This data is student majors.
Now, I want to assign each major a department and display the department in column U.
I was able to complete this for row 5 by using If-Then statements (see snapshot below):
[Code] ......
However, I would have to copy and paste that code over 200 times and replace the B5 and U5 with the correct row number. How can I get the macro to do this for each cell in a specified range?
I tried the following, but it did not work:
[Code] .....
View 3 Replies
View Related
Oct 20, 2012
I have a worksheet (WORK1) that contains two columns of values that I can add to or change if necessary. The first column would be a text string (STRING), the second column would be its category (CATEGORY).
Example:
STRING CATEGORY
Chevron Gas
Exxon Gas
Vons Groceries
McDonalds Hamburger
In a separate workbook (WORK2), I have a column (A) which contains text. Ex:
A1 = "Station 2134 Chevron Motor"
A2 = "ExxonOil 234"
A3 = "Vons store"
A4 = "Hamburger McDonalds"
I would like to assign B1, B2, and so on... a CATEGORY if it contains STRING.
For this example, B1, B2, and so on... would be assigned the values.
B1 = "Gas"
B2 = "Gas"
B3 = "Groceries"
B4 = "Hamburger"
View 5 Replies
View Related
Jun 24, 2014
I need to write an excel function/macro/code to assign yes or no to a cell if the Description fits a certain category. I have attached a sample workbook and will explain what I mean.
In the sample workbook, there is data on a company. This included a unique ID, city, state, and description. What I want to do is fill out the yes/no column. So if a particular company has 2 of the 4 necessary "Descriptions", then column G will return yes, otherwise No. It must return yes for a particular company/ID if 2 of the "Descriptions" are "Sale", "Service", "Business", or "Par". I only want it to count at least two unique descriptions.
For example, in the sample workbook, Company A has all 4 of the necessary descriptions, thus everything in column G for this specific client should be yes. For Company B, only 1 of the 4 descriptions matches, so it returns No for all Company 2 columns. Company C has 2 of 4, so it returns yes for these columns. Note, it doesn't matter for Company C that "Business" was listed twice. It only needs to count the first unique time that description occurs.
View 6 Replies
View Related
Dec 17, 2008
Does the line of code assign the value of cell A5 to the range or is it just a startinig point?
View 9 Replies
View Related
Jan 24, 2009
In my workbook sheet 11 has some ranges that need to have names based on cell values in sheet2 (for purposes of data validation lists).
Range S28:S46 will assume the name of sheet2A11 & sheet2A3.
(example name period_1unit_1)
Range U28:U46 will assume the name of sheet2A11 & sheet2A4.
Range W28:W46 will assume the name of sheet2A11 & sheet2A5
Right now I am calling the code when something is entered into A11.
I have tried if statement and select case, but I ran into complications with both.
I have posted both codes with the questions I have concerning those codes.
View 6 Replies
View Related
Nov 22, 2011
How to assign a range in excel using a defined (different) cell.
I've this formula
=INDEX($A$1:$A$17,RANK(B2,$B$1:$B$17))
I want to to choose the range from A1:A17 ... i'll use the formula too many times with different ranges for example A1:A21 and i want to know a way to insteed to change it manually each time to make the formula consider the value i insert in a different cell, so i can only change the value in this cell.
for example:
=INDEX($A$1:$A$D1,RANK(B2,$B$1:$B$D1)) so it can consider the value in cell D1
View 7 Replies
View Related
Feb 21, 2013
How do you assgin a vaule to highlighted cells?
I'm using excel 2007.
View 3 Replies
View Related
May 15, 2014
I have an excel spreadsheet that 7 different categories (eg. Ave waittime, Avg loadtime, etc) that I have conditionally formatted based on 5 ratings (each rating a different color Green, light green, yellow, red, and purple) I would like to be able to give each cell a value based on what color it is eg. Green=5, light green=4 and so on.
View 2 Replies
View Related
Nov 7, 2007
I have a "memo of meeting" excel document used to capture notes during client meetings. In this document there's a cell for "purpose", "agenda", and "notes". The 'consultation type' cell is a drop-down populated by values set in Sheet2. The 'agenda' & 'notes" cells are then populated with information (also stored in Sheet2) based on what drop-down option was chosen in the 'purpose' cell. I'm currently making this happen with basic =IF() statements; however, the problem is that by doing it this way, the =IF() statement must reside in the actual cell which will end up showing the data.
This is undesirable as there may be additional notes, agenda items, etc. that I'll need to add during the meeting and as it's currently setup, I can only have either the pre-populated info OR the ad-hoc notes - not both. It seems a simple fix. Maybe put the =IF() statement in a cell off to the side but have it "assign" the value to 'agenda'/'notes' but that doesn't seem to work.
View 9 Replies
View Related