If A Cell Is Empty Then Enter Data From Another?
Jul 26, 2006
I have an excel sheet with a few columns, Column (1) has data entered for ever row (with a name.) Column (2) has a few random cells with data (names) about 30% and the rest are left blank. What I need, is to have a formula in a new column (3) that will put in the the data (names) of column (2) and then if there isnt data in column (2) then it will put the Data (names) from column (1). (ps, If i cant get this figured out, we have to buy a custom interface and it will cost around $7000,)
View 2 Replies
ADVERTISEMENT
Aug 16, 2008
I have an excel sheet with a couple of rows/columns of data in it (i've attached the sheet to my post (zipped in two parts)). Since I'm not familiar with VB. I want to simplify data entering procedure and I need a simple Userform for that purpose. That userform should enable me to enter data in the first row which has an empty cell in Column C. I have found a relatively decent userform on the internet and incorporated it into my sheet, but it's not working particularly well (it allows me to enter data only in one row, not in two or three). If I hadn't been clear enough, try to enter data in my sheet and you'll see what's the problem
Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("PartsData")
iRow = ws.Cells(Rows.Count, 3) _
.End(xlUp).Offset(1, 0).Row
If Trim(Me.txtPart.Value) = "" Then
Me.txtPart.SetFocus
MsgBox "Please enter a part number"
Exit Sub
End If
ws.Cells(iRow, 1).Value = Me.txtPart.Value
ws.Cells(iRow, 3).Value = Me.txtLoc.Value
ws.Cells(iRow, 4).Value = Me.txtdate.Value
ws.Cells(iRow, 5).Value = Me.txtQty.Value
Me.txtPart.Value = ""
Me.txtLoc.Value = ""
Me.txtdate.Value = ""
Me.txtQty.Value = ""
Me.txtPart.SetFocus
PS you'll notice that I have a Command button/Macro that inserts new rows in the middle of the already entered data. It perfectly suits my needs since it also copies the formula from the Column L to the new rows. That code needs no repairs.
View 5 Replies
View Related
Jan 29, 2010
I'm having a hard time putting this into words, so I'll try to make it simple.
I have a list with cells b1 thru f1 empty.
If one or more of those cells becomes populated, I want today's date to show up in cell g1.
Yes, the user could enter the date manually, but apparently that's too difficult for some people.
View 9 Replies
View Related
Jun 1, 2014
I really know nothing about vba so here goes. I would like to enter data in a row with 4 cells of info. then hit enter and return to the first cell and move the row down. all four cells must have data entered. and all four must move down. i tried some code as below i found and i modified but it did not work as expected. this moved the row down when returning the cursor to A2. It also should not copy the data style of the top row.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
Application.EnableEvents = False
[Code].....
View 4 Replies
View Related
Feb 20, 2010
I'm inputting data in E3 and after I hit enter I want B2 to be
selected. But only for E3 and only in one worksheet. And possibly a
further step... Sometimes the formula in B2 has picked up data from
another place depending on what value was entered in E3. If it's done
this then I won't need to go to B2, I'd want to go to A8 after E3
instead of B2.
View 9 Replies
View Related
Mar 12, 2007
Is there a way to add data into a cell that already had a formula? Lets say in cell A1 we have a formula like "=A1*A2". Would I be able to some how enter a value into cell A1 without changing the formula?
Example: enter value "5" into A2 and value "10" into A1 which would result in A1 value being "50" after value is entered.
I know that this creates a circular error but is there any other way to accomplish this?
View 10 Replies
View Related
May 14, 2013
I know I can put an IF formular into B1 =if(A1="sat",D/O,0) but obviously if people enter data to this cell i.e time they worked the formula goes is there anyway I can put a formular into C1 but have the result entered into B1?
A1 sat
B1 D/O
C1
View 7 Replies
View Related
Mar 27, 2009
Is it possible to have a formula in a cell which can be overwritten by manually entering in a number, but if the manually entered number is deleted, the formula remains in the cell.
View 9 Replies
View Related
Feb 26, 2009
I have a workbook with over 900 worksheets.
The macro I have is looping all sheets looking for empty cells in a specific column, and when it founds an empty cell the value for one cell is copied to the empty cell.
But in one worksheet it stops with the error:
Run-time error '1004'
Application-defined or object-defined error
View 2 Replies
View Related
Oct 19, 2011
I have a very long spreadsheet with about 3000 rows. lets say for simplicity that column A contains a list of product ID numbers. I am looking for some macro code where I can just type in the product ID into a textbox, then hit enter (or a 'go' button) and then the cursor will move to the cell containing the part number.
I know Ctrl+F will do the job for me, but because of the frequency that I do these searches, a text input box would be easier still.
The nearest solution I could find was the one here Find text but its a bit 'overkill' for my needs.
View 1 Replies
View Related
Aug 19, 2013
I have used data validation to colour rows in one of my spreadsheets at work. The column that uses the data validation is the first column and has a drop down list of 5 words. One of which is collected, which currently indicates when the card has been collected by the individual in question and no further attention is required. It colours the rest of the row green. There is also a column that is entitled 'Date Collected'. Instead of having to input this manually, is there a way to automatically enter the date to be the date that the 'Collected' value was selected?
The title is misleading, I realise there will need to be some sort of IF statement in the 'Date Collected' column. It's been a long day already.
View 6 Replies
View Related
Dec 29, 2009
Is it possible to create a command button to print the sheet, and, have a prompt come up and ask you to enter a date? Then that date is entered in a cell and the sheet prints? Just not sure where to start. I know how to make the command button and get to the view code for the button.
View 9 Replies
View Related
Feb 21, 2014
If any text or number is added to a specific cell then a letter "P" is entered into another predefined cell.
Example:
Cell A1 is normally empty but if a number or text is added to cell B1 then a letter "P" is automatically placed into cell A1.
View 1 Replies
View Related
Feb 3, 2014
I need to add something to the code below to have my first row of data entered into cell "Q8". As it is now the data is starting on row Q9 instead of Q8, but the rest of it is filling in correctly.
[Code] .....
View 1 Replies
View Related
Dec 28, 2011
I have a excel sheet in it. Is it possible? That when in any cell I input data in a cell and press "enter" then it save automatically.
View 8 Replies
View Related
Oct 2, 2012
I'm using Excel 2010, and I need to restrict the value the user can enter into a cell (E9).
In cell E3 is the screen width (pixels). eg 6024
In cell E5 is the preferred width of a window. eg 450
The user, in cell E9, enters an x coordinate for which they prefer the top left corner of the window whose width is specified in E5.
If the value that the user enters in E9, added to the width entered in E5, exceeds the value of E3, (if E9+E5 > E3) then the value should be disregarded (window will be off right of screen) and the user re-enter.
I'm not familiar with the use of data validation, so I'm uncertain as to how to use it in this circumstance.
View 3 Replies
View Related
Apr 3, 2009
vba macro, I've a s/s where column "W" is named "Proceeds" column and i would like to sum empty cell with above data. see below raw data:
Proceeds
-23,900.00
-18,100.00
198,000.00
198,000.00
-326,250.00
-326,250.00
Now i would like to sum empty cell & colour background with yellow and borders with top and thick bottom border.
View 9 Replies
View Related
Jul 18, 2012
I am using a worksheet to scan or enter students into a school event and determine their eligibility to participate in the event. Everything is working great but I need to do the following on Enter Student button click:
1) Cut scanned value (ID number) from input Cell A1
2) Paste value into next empty cell in column A (Rows build as students are inputted)
3) Copy Eligibility status (text) from column F into A6
I have a limited VBA/Macro background and have NEVER got a button to work.
View 9 Replies
View Related
Apr 20, 2009
I am trying to display a message box for the user if there is "agency" in cell o8 but nothing in p8... I tried the following code but it doesnt work..
If Range("o8").Value = "Agency" And Range("p8").Value = "" Then
MsgBox "Please provide name of agency in cell p8"
Sheet9.Shapes("cross").Visible = True
Else
View 9 Replies
View Related
Jul 31, 2009
I'm using Excel 2003 and have a main workbook which stores the quotes, invoice, worksheet and contact details. In order to email only the invoice to a customer I have created another workbook which replicates whatever is shown in the open invoice tab of the main workbook. A macro from the main workbook then opens outlook.
I attach a sample of both for information. My problem is this - You will note that on the email invoice that any entries where there is no cost in the main workbook, that it shows "£ -". how to get it to show an empty cell if no value in the main workbook?
View 2 Replies
View Related
Jul 19, 2014
I have created in VBA a formula to look for the last empty cell in the "SBV INFO" sheet and it works.
I now need the VBA to go the the DCWC sheet and only extract the data and amounts from Columns K and M where there is a value more than "0" in column M.
The the data in Column K where the value in Column M is more than "0" must go to the first empty sell (found in the SBV INFO sheet) as per the VBA and the corresponding amount in Column M must go to Column AA (also in the SBV INFO sheet)
In other words from the attachement I need the following:
Column M in SBV INFO sheet 1st empty cell (this will vary which is why i did the formula)
SBV DURBAN WHL
SBV George RET
SBV PEW WHL
Column AA
237,030.00
248,000.00
150,000.00
This might change in future. which means I would have to be able to transfer 1 to 15 of these names and amounts depending on the value in Column M from the "DCWC" sheet.
View 7 Replies
View Related
Oct 28, 2008
I have searched around and cannot find exactly what im looking for. I have a table of data and want to delete it all by clicking a button. I only want it to delete the rows which have data in.
Example
A1 = Apple
A2 = Apple1
A3 = Apple2
A4 = Apple3
A5 = *Empty*
So it would delete A1-A4 and not delete A5.
View 14 Replies
View Related
Sep 19, 2009
I am looking for advice on how to move cells containing data (columns D to K in EXAMPLE A), upwards so that the information lines up with data already existing in columns A to C (to be included as part of an overall VBA routine).
In the upper example data in cell D2 needs to move upto D1, E3 to E1, F4 to F1, G7 to G1 etc and K9 to K1. Now, data on following rows is to move upto row 2 eg: E5 to E2, F6 to F2, G8 to G2.
The first 'block' of data starts at row 1 and finishes in this case at row 9.
The next 'block' of data starts at row 10 and finishes at row 18.
Row 19 shown is the start of the next 'block'. These 'blocks' may have upto 20 rows ....
View 11 Replies
View Related
May 23, 2014
Here find the excel file
My requirement
1) 4 values contains in each row based on the values from those cells the max value will display.
2) if more than 2 cells have empty,NR or NA text means the entire row has to delete.
3) if 2 or more that means 3 cells having values the empty cell,NR or NA cell will place value with the condition of macro that is 75% of other values which is maximum among them.
View 1 Replies
View Related
May 8, 2014
I am looking to find all visible cells in column E that are blank, and then add ''B'' to those empty cells.
I am using code similar to the below:
[Code] .....
View 5 Replies
View Related
Jan 8, 2008
I have a long range of cells (U3:AX3), all of which are empty save one. Is there a way to search through the range of cells, and return the contents of the one cell that contains text?
I would do this with a series of nested IF statements if there weren't more than 30 of them!
View 9 Replies
View Related
May 30, 2009
Is a Cell with a formula (like shown below) considered true, or is it empty?
=IF(Scorecard!$B$13,Scorecard!$AD$4,"")
If Scorecard!$B$13 was False...
Would a cell with the above formula be considered?
True or Empty?
If Scorecard!$B$13 was True...
A cell with the above formula would be True.
View 9 Replies
View Related
Oct 22, 2009
I'm using Excel 2002 and am having trouble with what I thought was a simple conditional command. On part of the spreadsheet I have 3 columns: Hours (D5), Cost Per Hour (E5) and Total Cost (F5). Here's what I'm trying to do.....
If there is no value in the Hours then the Total Cost should show an empty cell and conversly if there is a value in Hours then calculate Hours*Cost Per Hour in the Total Cost cell. My condition for cell F5 is as follows: =IF(D5="","",SUM(D5*E5)). Whilst it works if there is a value in D5, when empty F5 shows #VALUE!
View 5 Replies
View Related
Dec 13, 2013
I want to create a macro to paste some data into the next empty cell. Below is sort of what I need but this show it going to a particular cell, I need it to got to next open cell in the range from say BY3. So next macro run it would copy and paste the data from T3:T9 (always this range) to BZ3 then CA3, CB3 and so on.
[[Sub CopyData()]
'
' CopyData Macro
' Copy The Data To Build Graph
'
[Code]....
View 1 Replies
View Related
Apr 29, 2014
I have a Rental Form that i'm working on, and to tidy things up when I print it out, I would like to move a cells data down 1 row if that cell is empty. Here's what I have:
cell b8 - First and Last Name
cell b9 - Address1
cell B10 - Address2
cell b11 - City, State, Zip
cell 12 - Phone #
etc.
Not too many people have an address2, so when that field is empty, I'd like to move Address1's data down to it's position (address2). If address2 has data in it, leave address1 where it is. Simple right? This moving would happen when the command button is hit and the form data goes to sheet 1 which works fine.
View 10 Replies
View Related