Give Cell A Unique ID Based On The Contents Of 2 Other Cells

Aug 11, 2008

I am trying to give a cell a unique ID based on the contents of 2 other cells.

Basically in cell A1 a value is entered between 1 and 13 and in cell A2 another value is entered between 1 and 4 to find the unique ID that matches these I need to look in DF4:FE4 to find the number that matches A1 ( there will be 4 matches) then look in thoses 4 matches in DF5:FE5 to find the match to A2 ( there will only be 1 match ) then return the id from the relvant cell in DF3:FE3.

View 9 Replies


ADVERTISEMENT

Merging Cells Contents Based On Unique Identifiers

Feb 22, 2010

I’m having some problems writing a macro,

I have a spreadsheet with 2 columns. The first column is the index number (unique identifier) of the second column’s data that will repeat itself as many rows as needed. Let me try to exemplify it:

Column A (index)Column B (text)
1 AAA
1 BBB
1 CCC
2 DDD
2 EEE
3 FFF
3 GGG
3 HHH
3 III

I’m trying to write a macro that will merge the text of each identifier in the first row it appears. The result I’m looking for is:

Column A (index)Column B (text)
1AAA
BBB
CCC
2DDD
EEE
3FFF
GGG
HHH
III

I already know how to make the merge, but I can’t get the logic to make it go through each row and merge the contents, since the number or rows for each identifier varies.

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

Vba Cell Control Based On The Cells Contents

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

Hyperlinking Multiple Cells Based On Another Cell Contents

Feb 23, 2012

I have just started to learn how to use vba in microsoft excel. Over the past few days i have been creating a drawing register and have incorporated multiple routines based on searching this forum. Up until this point i have foud everything i needed on this forum, but now i cannot work out how to creat a routine that does the below.

The setup
*I have a folder called Zircon Plant
*That folder contains 3 folders 01. Superseded, 02. PDFs and 03. Documentation (the 01. Sup...etc. is the actual folder name, the 01, 02 and 03 isnt distinguishing the 3 folders)
*The Register is located in 03. Documentation
*The PDFs i want to hyperlink to are located in 02. PDFs

What i want to do
*i have 2000 rows of drawing names
*the drawing name in excel is spread over 5 side by side cells on each row (rows 21 - 2020) so for example the first row the information is in cells (H21, I21, J21, K21 ,L21)
*the cells i want to contain hyperlinks are V21 - V2020

so what i want is when excel opens up (i already have another script running at startup so i will be placing this after the other startup routine i have) i want it to search in folder 02. PDFs using the contents in (for example the first row (21) and colums HIJKL contain (H21)4CP(I21)-(J21)D(K21)-(L21)55000) each row and combine those cell contents to find the file name 4CP-D-55000.pdf. I then want it to go down every row until row 2020 untill it has added all pdfs.

(The second row is (H22)4CP(I221)-(J221)D(K221)-(L21)55001.....file name would be 4CP-D-55001.....third row would be 4CP-D-55002 etc...)

If such a pdf with that name doesnt exist, i want the cell (for example v21) to read "PDF not available"

based on a search here i have been able to do this for 1 cell, but dont want to do 2000 seperate routines. the current routine i have for it to work on one cell is

' Select PDF range
ActiveSheet.Range("u21").Select
' Promt PDF Hyperlinking
ActiveCell.Hyperlinks.Add ActiveCell, "I:DraftingAs Built4CP - PinkenbaE - ElectricallZircon Plant02. PDFs4CP-D-55000.pdf"

I also have multiple sheets. the first sheet is D - Documentation. I will eventually copy this routine 4 more times as i will be able to work out how to apply it to the other sheets

View 5 Replies View Related

Counting Unique Cells Based On Another Cell

Aug 1, 2008

I have 2 columns that I need to use simultaneously to conclude something.

Column A
Row 1: Dog
Row 2: Cat
Row 3: Bird
Row 4: Dog
Row 5: Dog
Row 6: Dog

Column B
Row 1: See Vet
Row 2: See Vet
Row 3: Get Rest
Row 4: Get Rest
Row 5: Get Rest
Row 6: See Vet

Okay, so I have these columns, and I want to count the unique number of animals that need to see a vet, or get rest. Based on the table above, there are 2 unique animals that should see the vet (Dog and Cat), and 2 unique animals that should get rest (Dog and Bird). how to do this in excel.

View 5 Replies View Related

Give Worksheet A Unique Name In The Workbook

Oct 2, 2008

I am trying to make sure that I give my worksheet a unique name in the workbook. To do this I create a name that really really really should be unique, but just in case I also try to check it against existing worksheets, and this is where I am having the problem. I thought the following code would trigger the 'goto' on a 'subscript out of range' error (ie. the sheet doesn't exist), and then carry on:

View 3 Replies View Related

Insert Row Based On Cell Value :: Give Input Box On Click

Oct 8, 2009

when a cell in column "K" is clicked, an input box gives the user the choice of entering a number between 1 and 12. That value then inserts row(s) based on input value ..

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

Chart With VBA Based On A Row With Values That Will Color The Offset Cell Interior Red And Also Give It A Value Of 1

Feb 15, 2010

I'm trying to make a simple chart with VBA based on a row with values that will color the offset cell interior red and also give it a value of 1. (look a the example sheet.)

View 4 Replies View Related

Excel 2003 :: Get Give Each Row Inputted Unique Number For Later Editing?

Mar 14, 2014

I have created a workbook to input, store and part edit defects on plants and machinery by userforms. I have everything working except either picking up a number I have pre-loaded into a column or auto generating a number onto the inputting userform. I need a number in the userform to be either generated in the next empty row in column I or taken from the numbers in the next empty row I have loaded into column I. Password is snatch.

Input 2003 test1.xls

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

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

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

Conditional Formatting Based On Another Cells Contents?

Sep 19, 2012

I'd like to format (colour fill) C1 when H1 contains the word "Bills"

I've tried to "use a formula to determine which cells to format" but it keeps using absolute references ($H$1).

Ideally I'd like to apply the "format" to the entire column C.

I did think I'd be able to use OFFSET but it's not working.

View 1 Replies View Related

Filter Out Duplicate Based On Contents In 2 Cells On Same Row

Aug 29, 2008

I have data contained in 4 columns. Column A is name, Column B is ID, Column C is Company, Column D is amount. There are duplicate names in column A and duplicate ID's in column B (ID's have correspending Company Names in Column C). I want to have a list so that this combination shows up only once, and then the amount next to it will be the sum of all.

Example:

DataABC DTom9730-003Company B100 Joe10242-001Company A200 Tom9730-003Company B300 Joe10242-001Company A400 Sam9730-003Company B100 Desired ResultTom9730-003Company B400 Joe10242-001Company A600 Sam9730-003Company B100

View 9 Replies View Related

Go To Range Based On Cells Contents/Text

Sep 5, 2006

I am just learning VBA. I need to move to a cell location that is named in a range. As follows:

The cell "Sheet2!A1" has a formula that results in "Sheet1!B3". I would like my VBA code to read that cell and select Sheet1!B3. When using something like:

Application.GoTo Range("Sheet2!A1")

I end up of course at Sheet!2A1. I want to end up at Sheet1!B3 or wherever the cell reads at the time the code is read and operated on.

View 9 Replies View Related

Conditional Formatting - Based On Another Cells Contents

Apr 27, 2007

I have a worksheet that I've applied conditional formatting to which works very nicely apart from when I use the formatting and apply it to a cell based on the contents of another.

What I don't understand is when I put a formula in cell b1 to read =$a1="yes" and format accordingly it works. So when I type in "YES" in to cell a1 ,cell b1 is highlighted. When I type in "NO" the B1 cell isn't highlighted which is what i would expect. IF however I delete what ever is in cell A1 the cell B1 is still highlighted.

View 8 Replies View Related

Count Unique Cells Based On Ajacent Cells Having Values

Jan 6, 2008

I have the following data in 1 of the tabs.

[TABLE]
ClassSequenceAB
10SE132422
20SE23212
20SE321
20SE23425
10SE332455
15SE132412
10SE234
[/TABLE]

I want a unique count of sequences in a different for that class only if that particular row in 'A' or 'B' is populated. The result set should be as follows:

[TABLE]
ClassAB
1032
1511
2012
[/TABLE]
Can this be achieved through a formula?

View 8 Replies View Related

Copy Only Part Of Cells Contents Based On Condition?

Jul 6, 2014

I will have 2 columns. In column B, will be a list of invoice numbers. Now each one starts with the "job number" (Ex. 51APGC01) then a dash and unique number per invoice. (Ex. 51APGC01-01)

In column A, will be a list of Purchase Order numbers sent by the customer so we can bill. Now, sometimes we get one PO for multiple invoices, (Ex. 03, 05, 06, 07.....)

What I am looking to do, is when I get these PO's, I enter them in and then I print a report for our billing Dept. The way the output line (cell) will read, is Job Number, then each unique number: (51APGC01-03, 05, 06, 07)

There are multiple jobs and each one has it's own report, so the job number will be dynamic and defined else where in the workbook. I can define that. It's just getting the numbers after the "-" and putting them in only.

View 5 Replies View Related

Hide A Rows/columns Based On A Cells Contents

Jun 30, 2006

way to automatically hide a row or column based on a specified cell.

Or even something general like: Hide all rows with cells evaluating to #n/a.

View 9 Replies View Related

Clear Contents Of Cells Based On Data Validation Selection

Apr 13, 2012

I am trying to find something that would allow me to have a spreadsheet clear the contents of a certain cell based on the selection made from a data validation list which resides on the same row. This can best be described with an example.

The user selects anything but " " or "none" from the validation list, which for this example resides in C5, would trigger code to clear the contents, if any, in AA5. If " " or "none" is chosen the value remains.

This capability should be available for each row through 100.

View 3 Replies View Related

Get A Cell To Look At A Row Based On Contents

Dec 24, 2008

I want to have a cell that looks at another cell based on a number that is in another cell. So imagine if you will: A1 contains the number 25. A2 contains the formula I can't work out. I want it to look at the row that is the number contained in cell A1, so in this case it would look at row 25.

Now I want to narrow it down further to a cell in that row but this will be a constant so lets say column F. So if A1=25 then A2 would display what ever is in F25. If cell A1 were 16 it would display the contents of F16 etc. The best I got was something like =IF(A1=>1,(F(A1))) but obviously that is wrong as it doesn't work.

View 2 Replies View Related

Add Row Based On Cell Contents

Apr 25, 2006

I want to add a row underneath a row if the value in the in B cell is not = "". Then i want to write a value in the C cell of the new row.

View 2 Replies View Related

Workaround For Public Variable Bug: Creates Different Cell Colors Based Upon The Cell Contents

Oct 15, 2008

I am in the process of reformatting an excel workbook to act as a review tool for different factors in a process. Part of my redesign includes the use of coding that creates different cell colors based upon the cell contents. The new workbooks will be used to handle existing data for this year. I have developed a process macro to open an existing workbook and copy and transfer the original data worksheet into the newly formatted workbook. The data gets transferred to the new worksheet and the resulting workbook is renamed and saved, Heres'' the rub... the newly saved workbook is missing all of the coding for the worksheets... apparently this is a MS bug.

Has anyone figured a workaround for this. One thought I had is to open both( new and old )workbooks and rather than move/copy , i would transfer the data using cell references.

View 5 Replies View Related

Macro That Will Clear Contents Of Cell Based On Format Of Text In Adjacent Cell

Feb 18, 2009

Been racking brain, searching through the forum here, and my Excel 2003 Bible all day trying to figure out this problem to no avail. I would like to clear the contents of any cell in a given range if the cell immediately to the right of is formatted as bold.

View 2 Replies View Related

Automatically Update A Protected Cell Based On Contents Of An Unprotected Cell

Apr 30, 2009

I am trying to find some VBA that will allow protected cells to be updated when a user enters or selects data in other cells.

For example:

Cell 'A1' starts out blank.
Cell 'B1' has a drop down to select specific items.
Cell 'C1' is the date of the order and is a locked cell.
Cell 'D1' is the date of completion and is a locked cell.
The worksheet is protected to prevent direct changes to cells C1 and D1.

If a user enters any information in A1, then C1 displays the current date.
If a user selects 'Complete' from the drop-down list in B1, then D1 displays the current date. Both of these actions are independant of one another. This format is the same for every cell in the 4 columns indicated above. I thought I was able to do this in another spreadsheet I created a year or so ago but I have not been able to figure out what I did and I do not have the spreadsheet to look at.

View 5 Replies View Related

Replace Cell Contents Based On Matching Data In Another Cell (On Another Sheet)?

Apr 28, 2014

I am working with a spreadsheet that has our user data; User(First) Name, User(Last) name, Computer Name, MAC address, Phone Number, Seating Position and Network Port Number.

I have let this get horribly out of sync, moved computers around, and moved them while the MAC address column was hidden, As a result, I have a bunch of users listed as being at the wrong computer. I have a second spreadsheet I generated that gives me the logged in user for about 2/3 of my computers, with the computer name(Just 2 columns, 'A' and 'B'. I would like to have Excel match the computer name and then overwrite the user name. For example, if the first computer in my correct user list is DELL-99945ty2, and the user name is "Jimbo Jones", I would like it to search the first Excel doc(The one with all of the user data), and replace the user name with "Jimbo Jones". Is this simple and straightforward?

In my main spreadsheet, the user name is in column B and the computer name is in column G, So I want to use the values from Column B in my second document to find its match in Column G of the first spreadsheet, and then replace the data in Column B with Column A in the first spreadsheet.

View 5 Replies View Related

Worksheet Name Based On Contents Of Cell

Oct 13, 2013

Is it possible to dynamically chance the name of at a worksheet that already exists based on the contents of a cell on another sheet?

I.e. If the name of a sheet is linked to the value of the Cell A1 in the "Data" sheet and I change A1 to read "Group1" it changes the name of the sheet as well?

View 10 Replies View Related

Lock Row Based On Cell Contents

Oct 17, 2008

I wish to be able to lock an entire row after an entry has been made in a certain cell.

e.g. let's say i want to lock row 9 in its' entirety following entry of "Yes" in cell G9. If there is no entry in G9 the the entire row should be still unlocked. Likewise with any row with a corresponding entry in column G.

View 14 Replies View Related







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