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


ADVERTISEMENT

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 View Related

Change A Cell's Contents By Selecting Another Cells

Jan 8, 2009

what i need is to affect the contents of cell c3.

if i select cell e15 i would like cell c3 to read 123
if i select cell e17 i would like cell c3 to read 234

i believe this could be done using an cell formula if statment but due to teh number of cells i wish to have affect c3 a vba based solution would be required.

i've built an if satement to do this under worksheet activate but not sure how to use the worksheet change way

View 9 Replies View Related

Clear Contents & Change Color Of Cells

Nov 3, 2006

how to clear contents and change colour index of cells.

This is for a booking system. The current VB codes allows bookings to be made by entering a reference number, dates of bookings and room type and bed type. When the VB codes are executed, the cells corresponding to the details entered earlier, would fill the booking table with the reference number and change the colour fill (e.g. yellow) to indicate that the slots are booked. Please refer to attached sample.

However, I do not know how to delete the booking. I would like to assign a cell for user to enter the reference number that needs to be deleted. So when the reference number is entered into that cell, user could execute a function which will clear the contents and change the colour index to none for that particular booking with that reference number(s).

Attached is a sample of the problem.

View 9 Replies View Related

Change A Worksheet Tab Colour Dependant On The Contents On A Range Of Cells?

Mar 24, 2014

I have a worksheey of data and i would like the tab to be a certain colour dependant on the the contents of a range of cells within that worksheet is that possible. i know i need to use VBA and it cna be done based ont he contents of one cell.

So for example i have a sheet of people i am awaiting payment from, based on the last column " bill paid" i want the tab to be Red if there are any blanks in this column/ range and go green when all the cells in the column/ range are filled with "y"

View 5 Replies View Related

Copying Merged Cells (3 Cells) Based On Contents Of Any Of 3 Cells To Right

May 29, 2014

I wish to copy a merged cell (3 cells) based on if only 1 of 3 cells to the right contain "X". if the top cell does not contain "X" than the merged cell is not copied. Also, is therea more elegant to copy 3 columns at a time rather than do one at a time as my code shows:

Sub CopyICUCAPU()
'
' CopyICUCAPU Macro
'
Dim i As Integer

[Code].....

View 14 Replies View Related

Show Contents Of Vertical Cells In Horizontal Cells

Nov 21, 2008

I am referring to the post made by NBVC at http://www.excelforum.com/excel-gene...xcel-help.html, Try: =IF($A1="",INDIRECT("A"&ROW()-ROW($A$2)+COLUMN(B1)),"") in B2, copied across and down

I have a similar case but there are no empty rows between lists, what would be the formula to get the same results? (The transposed address should appear next to each first line of each block).

Earlier, I posted at http://www.excelforum.com/excel-gene...-one-cell.html and I got brilliant answers, I also would like to get benefit of the above mentioned formula but in cases when there are no empty rows between lists.

View 4 Replies View Related

Clear Contents Of All Unlocked Cells (many Are Merged Cells

May 28, 2009

I am looking for a code that will clear all of my unlocked cell in sheet 1. That is not a problem but since many of the cells are merged I know it keeps throwing me an error saying cannot change contents of merged cells or something like that. Does anyone know how to get around this without unmerging the cells. I saw a code to unmerge all of the cells on a sheet but I really don't want to do this as I already have worked around most of my problems with the merged cells.

View 14 Replies View Related

VBA To Clear Contents Of Cells And Keep Some Cells Locked

Jan 25, 2010

I have written this code to clear the contents of certain cells, lock the content of others and protect the sheet again it works on sheet1 but not on sheet 7. This is suppose to happen when the Print button on my sheet is clicked.

View 4 Replies View Related

Add Cells Based On Contents Of Cells In Another Column

Feb 15, 2008

I have a spreadsheet that has columns stating both status and then further to the right in the row, currency totals. There are only two status options, Stocked and On Order. I need to add the total currency amounts based on this other column's listing and it must change if status changes.

(Put simpler:
Column A lists Stocked or On Order and Column B is the currency tied up in that row.
I need to make totals for the cells in column B based on the status listed in Column A and it must change when Column A is changed. This should result in two totals, one for Stock Status Currency and one for On Order Curreny)

View 5 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

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







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