Combine Contents Of Two Cells Depending On Contents Of Another?

Jan 14, 2013

I am trying to combine the contents of two cells depending on the contents of another, I have tried to use the If function but am coming up stuck!

I have provided a link to the example file below:

[URL]

View 4 Replies


ADVERTISEMENT

Blank Out Certain Cells Depending On Cell Contents?

Oct 21, 2013

I have a spreadsheet that can do more than one calculation on each row

ITEM
FLOW
(l/s)

[Code]....

The values in row A can only be selected from a named range drop down. If no entry is there (i.e. blank) then i'd ideally like the cells to return from black to white.

View 9 Replies View Related

Returning One Of 2 Formulas Depending On Contents Of A Cell?

Jan 27, 2014

I have a cell in which I am entering either the letter "C" or "S".

I then want the following to happen......

If the cell contains the letter "S" do = IFERROR(VLOOKUP($B7,'Asset Growth Rate'!$A$2:$F$39,2,FALSE)*$C7,"-")

If the cell contains the letter "C" do = IFERROR(VLOOKUP($B28,'Asset Growth Rate'!$A$2:$F$39,3,FALSE)*($C28+$F28),"-")

The formulas themselves are already working in separate cells, I now just want to combine them depending on whether the cell contains S or C.....

View 1 Replies View Related

Delete Entire Row Depending On The Contents Of A Cell

Jan 20, 2009

I'm trying to write a procedure which will search the contents of Column B of my worksheet for the word "Total". Whenever the word "Total" is found in a cell within Column B, the entire row should be deleted.

View 5 Replies View Related

Combine Cell Contents With Named Range?

Aug 8, 2013

I have a cell with a drop-down menu where the user can select "Plant A" or "Plant B".

I have a cell below that with a sales number, which comes from a different tab where the sales number is input and has a named range.

For example, the input tab has a named range called "Plant A Sales" and a value of 1234, and a named range called "Plant B Sales" with a value of 5678.

I want to put a formula in a cell that will look at the cell where the drop-down menu is and will populate that cell with the correct data for the selected plant.

So if the user selects "Plant A" from the drop-down menu, the cell will show "1234". If they then select "Plant B" from the drop-down menu, the cell will show "5678".

View 1 Replies View Related

Combine 2 Rows Of Data Into One Line While Summing Their Contents?

Jul 1, 2013

Basically, we have 2 tablets tallying data and writing to the same .csv file. That csv file is then copied into a front page of a much larger excel worksheet where the tallied data is sorted and used for a variety of reasons. This works perfectly using index and match when only 1 tablet is being used, however, when both tablets are writing to the same csv at the same time it creates 2 lines instead of 1 line.

For example 1 tablet might look like this:

Lot 45689 4 6 8 9 1 5

2 tablets looks like this:

Lot 45689 2 3 1 8 1 4
Lot 45689 2 3 7 1 0 1

for the tallies, i would imagine a =SUMIF function might suffice, but that doesn't solve my problem of there being 2 lines with the same lot #.

I am only dealing with this issue from the excel side, and have no control over the tablet functionality or the CSV file which further limits me.

Wanted to add that the Lot #s change daily and often so with my understanding of pivot tables this rules them out as a viable option.

View 10 Replies View Related

Having Cells Change Their Contents According To What The Contents Of Other Cells Are

Mar 25, 2008

I have a column in my .XLS whose contents I want to change depending on what the contents of the cells of a different column are. However, I only want two cells from the same row to be dependent on each other. So, for example, if $A$1 reads "1" then $B$1 should read "apple" and if $A$2 reads "1" then $B$2 should read "apple"; if $A$12 reads "3" then $B$12 should read "pavement" etc.

View 11 Replies View Related

Compare Cell Contents With Given Range Of Contents

Dec 30, 2013

I have attached a workbook stating my problem.

file1.xlsx‎

View 10 Replies View Related

Clear Contents Of Cells

Sep 10, 2013

I want the function of clear contents to work based on the value of B4. If I run the code with clear content part excel crushes.

VB:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("B4") = "Basic" Then ''*** B4 is adropdown ***''
ActiveSheet.Unprotect
'Range("B10,F10,H10").ClearContents ''*** if I run this part the excel crushes ***'''
Range("B10,F10,H10").Locked = True

[Code] .....

View 4 Replies View Related

Moving Contents Of Cells?

Feb 9, 2013

About half of the time when I move the contents of a cell I get the message "The Clipboard cannot be emptied. Another program might be using the Clipboard"

View 14 Replies View Related

Delete Contents Of Cells With 0

May 15, 2009

Is there a way using a macro to check each row in Column D and Column F for "0", so that when both columns in the same row have "0" and only when both columns in the same row have "0" the contents "0" in that row of Column D and F will be deleted?

View 2 Replies View Related

Replacing Contents Of Cells?

Apr 11, 2003

I am doing a "text to columns" in a VBA script and each time it runs I get a "Do you wnat to replace contents of the destination cells" prompt. I will always say yes to this prompt. Is there something I can put into the code to avoid this prompt all together, again the answer will always be yes to the prompt.

View 3 Replies View Related

Clearing Contents Of Cells

Apr 27, 2007

My computer runs on Excel 2003 but my Laptop is on Excel 2000, the problem is I have the below code on a spreadsheet I wrote on my Computer which runs fine but when I open it on my Laptop it comes up with a run time error it doesn’t like the clear contents line. If some one could explain to me why it is happening and how to get round the problem so it will work in Excel 2003 and 2000.

Private Sub Workbook_Open()
Application. ScreenUpdating = False
Sheets("data").Visible = xlVeryHidden
Sheets("Incidents").Visible = xlVeryHidden
Sheets("Front Sheet").Select
Range("A17:S17").Select
Selection.ClearContents
Open1.Show
Range("A17").Select
Application.ScreenUpdating = True
End Sub

View 2 Replies View Related

Return Contents Of 1 Cell Based On Contents Of Another Cell?

Mar 12, 2014

I thought this was a pretty simple formula but I am having difficulty creating it. I am attaching a little test spreadsheet. Sheet 1 is where the data will be entered. The Reimbursed column has a drop down choice of yes or no. The next 2 columns are the cost of registration and the cost of accommodations. On sheet 2 is where I would like the formulas. So in cell A4 I would like a formula that says if B3 on sheet 1 is Yes populate this cell with the contents of Cell C3 only, B4 of sheet 2 would then be B3 if A3 on sheet 3 is Yes and so on with the Not reinbursed if sheet 1 the Reimbursed column is no.

View 3 Replies View Related

Copy Contents In 2 Cells - 1 Of Which Is A Date

May 7, 2014

In column A, i have cities.
In column B, i have dates.

I would like column D to have both the city and its corresponding date e.g. "paris (12/06/2013)"

However, I am getting "paris (41437)". Is there anyway to make the date appear properly?

View 3 Replies View Related

BOLD - Contents Of Cells In 2003

Nov 12, 2008

I cannot "BOLD" the contents of cells in my spreadsheet by clicking "B" on the menu bar. However I can do so by clicking on "Format - Cell - Font" and then using the selecting the Bold option. I wonder why this happens.

View 2 Replies View Related

Splitting Alphanumeric Contents In Cells

Jan 18, 2013

Cell A3: Abbott, Robert M.,MD
Cell A4: Bussiere, Laura P., ARNP
Cell A5: Bradford, Melinda ARNP

I have this data in Column A and I'd like each person's last name to appear in Column A and the first name to appear in Column B and the credentials to appear in Column C like this:

A3 B3 C3
Abbott Robert MD
A4 B4 C4
Bussiere Laura P. ARNP
A5 B5 C5
Bradford Melinda ARNP

Also I'd like to be able to do the same with addresses:

In Row Q I have:

Q35: Jacksonville, FL 33204
Q37: St Augustine, FL 32092-1850

I would like this to appear in the sheet as follows:

Q35 R35
Jacksonville 33204
Q37 R37
St Augustine 32092-1850

I don't need the state in any cell. It can disappear as well as any commas. Is any of this possible?

View 1 Replies View Related

Merging The Contents Of Two Cells In One Third Cell?

Sep 11, 2013

How can I let cell F5 for example contain both the texts or contents of cells A1 and B1? Is there a function that can do that purpose?

View 5 Replies View Related

Contents Of Cells Appear Based On Another Cell

Dec 14, 2013

I am working on a sheet where I want the contents of cells D1:D10 appear if cell A1 has a text in it and the contents of cells D1:D10 disappear if cell A1 is blank. What is the right conditional formatting formula for this.

View 3 Replies View Related

Conditional Clear Contents Of Cells

Oct 10, 2008

I have a dropdown list in the range E17:E91 containing a list, and two of the values in the list are "DI" and "LTC". What I need to happen is if either of these are selected, the corresponding cell in column F needs to have it's contents cleared. Ex. if in E17 the value is ever either DI or LTC, cell F17 gets contents cleared. if column E contains ANYTHING ELSE, nothing happens. That's all, I've taken care of conditional formatting and data validation already. So even if data is pasted in the worksheet into column E it needs to recognize that and always act in real time.

View 14 Replies View Related

Copy Row Based On Contents Of 2 Different Cells.

Apr 5, 2009

I would like to do now would be to only copy the rows that also contain the word sold in column C. I guess that I could do this in two stages, first copying the rows based on the year then copy again based on the word sold in column C. It would be nicer to make a slight modification to my code and do it all in one step.

View 2 Replies View Related

Clear Contents Of Cells In A Range, LEN=0

Dec 23, 2009

I'm using a macro to copy the results of a formula and paste the values only on another sheet. The result includes lots of "blank" rows. I have another macro to get rid of the empty rows and move the information up.

It's not working because the "blank" rows aren't empty. Even though I paste values only, experimentation shows that the cells that appear blank return a false to the ISBLANK test with a length of 0.

So now I think I need a macro to run after the pastespecial command to look for cells within a range with a length of zero and delete the contents of those cells, but leave alone anything with a length of >0.

I am brand new to the idea of using VBA, but I have successfully cobbled together some stuff and can usually modify things to work.

It seems I need to maybe use some sort of IF statement along with a LEN and ClearContents. I don't want to delete the blank cells, just make them truly empty so that all of my actual data stays where it should, and my delete empty rows macro works correctly.

I did a search and see some info on clearing contents of columns or rows, or clearing contents based on the content of other columns or rows, but I'm unsure of how to tell it to search each cell within a range and clear the contents of 0-length cells to make them truly empty.

View 10 Replies View Related

Merge The Contents Of Selected Cells

Feb 9, 2010

this is my first post in this great forum. let me start talking about what I need, I used to convert some statement from PDF to XLS format for my work purpose. sometimes I am facing a problem that some text in the statement will come in more than one row, actually I need it to come in one cell but it is coming in several rows that mean, if I want to sort or filter my data, I will lose some important data. What do I want???

I want a macro to merge the contents of selected cells and put it in the first cell of the selected cells then clear the other cells. I will use this macro for the following cases: Case 1- assume we have this data in any sheet.

B1=How
C1=are
D1=you? ( all without any space )

after selecting the said cells and applying this macro, the result will be:

B1=How are you? ( one space only between the content of the selected cells )
C1=D1=empty

Case 2- assume we have this data in any sheet.

B1=How.........

View 2 Replies View Related

Modifying Contents Of A Cell Using Other Cells

May 27, 2013

I do not have excel or an xls for a sample, I will try and restate the question.

In Cell A1 It will be used for copying the contents of and pasting the completed information into web browsers.
In Cell A1 You will find This information contained and formatted in one cell alone.

Figure-1
A1=

Information About Company
Brief Story About Company
Product Name: (X)
UPC Number: (Y)
Serial Number: (Z)
Terms Of Sale
Etc

End Figure-1

I want to essential Modify (X)(Y)(Z) using different cells one for each variable. "All completed information will be found inside of A1"

Having Cell B1-B9 Being used as labels "Product Name" "UPC Number" "etc" and using cell C1-C9 to input variables for = (X)(Y)(Z)(ETC)

In reality from cell A1 will change dynamically, but some information will need to stay constant.

Every thing In B column will just be labels.
Every thing In C will be for variables.

View 1 Replies View Related

How To Replace Contents Of Destination Cells

Nov 20, 2013

I have a macro that imports results from a website. I want the macro to continue working but every now and then when the format of the webpage changes I get the message 'Do you want to replace the contents of the destination cells?'. Is there anyway I can get my macro to not show the pop up box and to automatically choose OK (I do want to replace the contents of the destination cells) instead?

View 2 Replies View Related

Cells With The Same Contents To Fill With The Same Color

Jan 13, 2009

I want cells containing the same contents to fill with the same color. But I want different colors for each matched set. I know I can match text to a color, but I may have 100 possible items and to create matches for all 100 would be time consuming and there are not enough colors. I just want random colors picked by excel to create some visual separation to similar cells.

View 9 Replies View Related

Writing The Contents Of Cells Into A File

Apr 12, 2009

I have a bunch of values in column A, and I need to write (export) the entire column into a file called "ColumnA.dat".

create an Excel Macro Script that would accomplish that?

View 9 Replies View Related

Clearing Contents Of Specific Cells

Dec 7, 2009

I created a macro to clear cells but I can't get it to clear a number of ranges. It will only clear single ranges.

Sub DeleteStuff()
Dim c As Range
For Each c In Range("G6:G10", "H6:H10", "J6:J10")
If c "" Then c.ClearContents
Next c
End Sub

View 9 Replies View Related

Adding Contents Of Cells For Duplicates

Dec 18, 2009

I have an employee sheet which has multiple hours rows for one employee, i want to select an employee ID and add corresponding hours and place both in a separate sheet. Here's my code so far.

Sub dup()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set NewSheet = Worksheets.Add
NewSheet.Name = "NEW"
Set NewSheet = Worksheets.Add
supcount = 2
countresources = 0
Do While Sheets("RS Nov 2009").Range("A" & supcount).Value ""
countresources = countresources + 1
supcount = supcount + 1................

View 9 Replies View Related

Name Cells From Adjacent Cell Contents

May 16, 2007

I want to create a macro that will run through a column and assign a name to each cell in that column that reflects the contents of another cell within each row.

for example, cell A1 = "Gerry", A2 = "Rob", A3 = "Ryan"
I would then like the Name of B1 to be "Gerry", B2 to be "Rob", etc (but to retain original contents).

Is this possible using VBA?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved