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
ADVERTISEMENT
Jul 15, 2013
I have a large set of data regarding the activities going on in particular rooms. The data contains activity name, start time, day, duration, room and size.
I would like to select all rows that contain a cell in the activity name column which contain the words 'VideoConference'.
I have tried to Search, Select All then index the remaining data using =iferror(index(etc. However some activities occur in more than one room and all variables apart from 'Room' are the same. Thus when I have tried to index the room column I get the same room for both rows.
ps the raw data set consists of +28000 rows so I can not simply look through and copy.
View 4 Replies
View Related
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
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
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
Jun 18, 2006
How can I change the font color or highlight cell A1, when I select cell A2. Cell A2 is still blank, no value entered yet. I also would like cell A1 to return to original font color or no hightlight when cell A2 is no longer selected (active), whether a value is entered or not in cell A2. Let me clearify, (A1 thru N1) and (A3 thru N3) have diferent dates and the font color is white, as is the cell too. Therefor you can not see the dates in (A1 thru N1) or (A3 thru N3).
However, when any cell (A2 thru N2) or (A4 thru N4) is selected (example A4), the cell above it (cell A3) changes font color or highlights, so the date can be seen in (A3). But when cell (A4) is no longer selected the above cell (A3) hides the date (changes back to white font on white cell). Data or a value is not necessarily entered into (A4) for (A3) to change. (A4) is only selected to show the date in (A3). But if data or value is entered into (A4), the date in (A3) will still be seen until (A4) is no longer selected/active.
View 4 Replies
View Related
Nov 9, 2008
i am downloading data from a website and one column of cells contains the date and the time. i only need the date and i am trying to delete the time from all cells in the column. i've tried formating but the time stays in the cell. i could go through the whole column and delete the date and time and enter only the date but that is cumbersome. i was wondering if there is a way to delete the time and keep the date in the cell?
View 9 Replies
View Related
Dec 18, 2008
I have a range of cells that I want to watch for a change in contents. If any cell in the range has a change in contents I want to launch a MessageBox that asks if they wish the new value to be entered automatically in all of the other cells in the range. Example:
Range = B8:M9
User changes F8 from "empty" to 38. MessageBox should launch asking if they want 38 to be entered into all of the cells in the range. Upon answering yes new contents of F8 should be inserted into the rest of the range.
View 4 Replies
View Related
Feb 21, 2012
I have a range B2:ZZ2000
Some of the cells contain a variety of dates (formatted as d-mmm) Other cells contain either "i", "n" or are blank - or contain a text string, eg "his name"
I'm looking macro code that will: Look at the range and only for any cell containing a date, replace it with "y".
View 1 Replies
View Related
Jan 23, 2008
I need to create a formula which will change the contents of the cell to one of 3 options based on the value of another cell
For example if I was using B2 as the cell to reference I need to say IF B2 = 0 then say "Closed", IF B2 = 1 then say "Open" and if its any other value then say "Error".
I'm having some trouble having all 3 if statements nested correctly.
I don't want to do this as a macro just as a formula.
View 9 Replies
View Related
May 30, 2008
i am trying to automate altering a DAT file. Basically, each line of data in the DAT file contains an entity name, an account name, and a value. for some of the accounts, i need to change the entity name. for all other accounts, i can leave the entity name alone. if i copy the DAT file into Excel, and use text to columns, how can i create a macro to compare the accounts to a range of cells containing a list of the accounts i need to alter the entity name for, and then change the entity name if there is a match?
the account does not need to match perfectly, the accounts i input only needs to contain the reference account. the list of accounts and the entity name i need to change to are in cells on another sheet. i thought about doing a loop to run through each line of data, but i am not sure how to do that.
View 2 Replies
View Related
Mar 9, 2013
I am relatively new to VBA. I am creating an attendance calendar that tracks employees calling sick, late etc.. It is a point based system. What I am looking for is, a way to clear the point value that was manually entered in a specific cell (I3), if there is a Value manually entered in (CU3). Each column in my worksheet is for a specific date ie; I3 is the cell where I enter the points (1.00) for that employee by calling in sick on 3/1/2013, (Column "I" is for 3/1/2013). After 90 days, this point accumulated by the employee does not count against them, so I need that point entered in (I3) to either = 0 or the cell contents to be cleared if there is a value entered in cell (CU3) which is 91 days after, so my (A3) cell does not add that point acquired on 3/1/2013.
I need this to run in a range (I3:I450) so if any value is entered into (CU3:CU450) it has the same result and continue to for (J3:J450) so if any value is entered into (CV3:CV450) and so on..
View 9 Replies
View Related
May 29, 2012
I want to check the contents of all the cells in S Column to see if it equals "Process Recover/Rebill"
If True, then Change corresponding cell in C Column to "Manual Correction"
I have this VBA and it doesn't look like anything is processing. It appears that I must have something missing in the If line..message about missing.
(tot_new is the number of rows of data) I begin in the 3rd row.
For Counter = 3 To tot_new
If Range("S" & Counter & ").Value = "Process Recovery/Rebill" Then
Range("T" & Counter & ").Value = "Manual Correction"
End If
Next Counter
View 3 Replies
View Related
May 13, 2008
I have some code as below
Range(ActiveCell, ActiveCell.End(xlDown)).Select
This should basically go down a list and stop when there is a blank cell. However due to a previous operation in my excel program, it is not doing so.
Basically this list has been formed from copy and pasting from a list of formulas. some of these formulas return a result and others return "" leaving the cell empty.
When i have pasted i have used paste special/values... but it still seems to paste something into these cells because this macro wont work.
I even went and manually selected the first blank cell and pressed the delete button and when i do this it correctly selects the cells only with content, so clearly when pasting a "" value it stops the activecell operation from working..
View 9 Replies
View Related
Feb 13, 2014
I have a column of values D1:D200. Using this =CELL("address",INDEX(D1:D200,MATCH(MAX(D1:D200),D1:D200,0))) it displays the cell with the largest value in. I have been trying to using VBA to select the 10 cells above and below the displayed CELL reference and so far I have failed. The largest value will always be somewhere in the centre of the column of values (between D50 and D150). I am looking to chart the trends leading up to and passed the largest value. I have been trying Range and Cells with no success
View 3 Replies
View Related
Aug 19, 2013
I have a spreadsheet that contains dates in column A, the number of rows between each date can vary. Selecting a cell with a date in will activate a checklist in the form of a UserForm.
I am trying to create a macro that will count the number of rows from one cell with a date, to the next cell with a date, and then resize the selection for printing.
So far I have this;
Code:
Sub test()
Application.ScreenUpdating = False
Set InitialCell = ActiveCell
[Code]....
My problem with this code is that when it reselects the InitialCell, the UserForm is reactivated. Is there a way to achieve the same results without having to reselect the InitialCell, and therefore the UserForm wont pop up? I tried adding the Unload UserForm1 line but it doesnt have any affect, the form still pops up.
View 3 Replies
View Related
Oct 31, 2006
I would like to select a range of cells relative to the current cell and move them to the right two cells. Basically, if I were in cell A1 I want to be able to have a macro select A1 - A8 and move them over by two cells leaving A1 and A2 blank.
Excel 2003
View 9 Replies
View Related
Feb 21, 2009
I want to be able to select a cell, for example A10, this would then run a macro that would copy and paste several cells of information along that row and paste it on another worksheet. However, if i then choose a15, a3, a79 in turn (using the control key), it would run the macro using those rows in turn.
i'm looking forward to hearing if and particuliar how this could be achieved.
View 13 Replies
View Related
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
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
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
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
Apr 5, 2009
I have a formula that looks at a cell on a front sheet, and then returns the contents of that cell as the result if it meets the criteria. So for example this formula would be in Cell A1 on Sheet2 IF(SHEET1!A1,"New",Sheet1!A1,"-")
This formula is always in the same cell (different sheet) as the cell that it is looking at, down 1500 rows. Instead of having the formula named for each cell is there anyway to ask excel to 'look at this cell but on this other sheet'.
e.g IF(Sheet1!"This Cell" etc). That way no matter what cell you put the formula in it is always referencing the correct cell for the formula?
View 2 Replies
View Related
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
Sep 18, 2012
I have a list of 20,000 addresses and because of the way the sheet gets populated by different departments, the COUNTRY CODE and POSTAL CODE columns get their data reversed.
Instead of 48193 US, it gets put in as US 48193.
Since i have some many, and they are not in order at all (I could probably sort by COUNTRY CODE and get 95% of the in order (except for those pesky Canadian codes), is there a macro way out of this?
Even if I select two adjacent cells and run the macro and have the contents switch. Or if there is a way to do the 95% all at once.
View 9 Replies
View Related
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
Sep 11, 2009
Is it possible to place formulas in vba to control cells based on the cells contents.
A2 will be the the price of an item excluding vat and b2 will be the price of an item including vat
What i want to achieve is if I put a figure into a2 b2 then multiplies a2 by 1.15 to reflect the price including vat. If this is achievable I then want to reverse the proceedure so if I put the price including VAT into b2 a2 divides b2 by 1.15 to reflect the price exc. VAT.#
if all of the above is clear and possible I would like to know if it is easily possible to copy the workings for a3, 4 ,5 ,6 etc and b3, 4, 5, 6 etc.
View 10 Replies
View Related
Jan 3, 2014
Setup: I have 2 worksheets with between 8 and 9,000 rows on each
Column A in both worksheets Sheet1 and Sheet2 have an email address in them.
Not all addresses in sheet1 will be on sheet2 and visa versa
Column J on Sheet 2 contains a date
What I need: Column M on Sheet1 is empty
I need a formula to place into Column M on Sheet1 that will
Look at Sheet1:A
Locate the corresponding value on Sheet2:A
Pull the date from Sheet2:J same row into Sheet1:M
View 2 Replies
View Related
Feb 22, 2013
I have created a worksheet with many calculations based on user input into several unlocked cells. I would like to create a cell that when selected, would clear the contents of this group of unlocked cells.
View 10 Replies
View Related
Jun 14, 2014
Attached is a document, column C & F highlighted in green are areas that users will input data. I need to create a button (top left of spreadsheet) that when pressed moves both the data from column C & F up into the box above. The top set of dates would be deleted and the dates from Trip 2 would move up into the Trip 1 position, Dates from Trip 3 would move up into Trip 2 position and so on.
View 2 Replies
View Related