Closed Thread
Results 1 to 10 of 10

if cell contains chosen text, add value from another cell in same row

  1. #1
    Registered User
    Join Date
    04-06-2009
    Location
    Llay, Wales
    MS-Off Ver
    Excel 2007
    Posts
    4

    if cell contains chosen text, add value from another cell in same row

    Hi
    I have a sheet with 65,000 rows.
    Column c contains text and numbers (phrases from search engine results seraches).
    Column G contains the number of times the phrase was searched.

    I am wanting to run a formula / macro which goes like;

    If cell in column c contains variable then copy cell g out of same row to cell h. This way I can quickly sum up column h to see total number searches by variable

    I have looked through forum for past half hour and could not find what i needed.

    Thanks in advance anyone.
    Attached Files Attached Files
    Last edited by desybabe; 04-06-2009 at 02:25 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if cell contains chosen text, add value from another cell in same row

    Formula in H1:

    =IF(ISNUMBER(SEARCH("variable",C1)),G1,"")

    replace "variable" with your keyword
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-06-2009
    Location
    Llay, Wales
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: if cell contains chosen text, add value from another cell in same row

    ace, works a treat.
    thanks for immediate response.

    quickest ever response to a problem i have ever had.

    one user question.

    how do I paste it down to the bottom of the column without having to wait for ages whilst I drag it down?

    i have 60,000 rows and it is taking for ever?

    ctrl shift end highlights all the other columns

    any ideas?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if cell contains chosen text, add value from another cell in same row

    Copy the cell with the formula in it and then go to next cell.

    Do a CTRL+G and enter the cell reference you want to end at in the Reference field.

    Hold the Shift Key down and click Ok.

    Now Paste.

  5. #5
    Registered User
    Join Date
    09-02-2011
    Location
    Liverpool, england
    MS-Off Ver
    Excel 2003
    Posts
    32

    URGENT: help with a formula/macro to consolodate existin data into new cells please!

    Basically, I have a list of data listing spend for different financial year. There are around 4,000 lines set out as per below (example of one supplier) :

    Supplier No Supplier Year Total Net No
    aae327 A A Engineering & Hydraulics Ltd 2010 £420.00 267
    aae327 A A Engineering & Hydraulics Ltd 2011 £455.20 347
    aae327 A A Engineering & Hydraulics Ltd 2012 £302.22 137

    As you can see they are set out over three lines for each financial year. It would be great if I could have just one line with results set out as below:

    Supplier No Supplier Name 2010 2011 2012
    aae327 A A Engineering & Hydraulics Ltd £420.00 £455.20 £302.22
    dfsdf Abp Marine Enviroment Research £0.00 £0.00 £302.22
    accor123 Accor £0.00 £507.65 £3,022.22

    I really have no idea how to get around this so any imput would be brilliant. I have attached a rough example of the sheet.

    Many thanks
    Jason
    Attached Files Attached Files
    Last edited by JasonHopkins; 10-03-2011 at 01:14 PM. Reason: nEED TO DELETE

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: if cell contains chosen text, add value from another cell in same row

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  7. #7
    Registered User
    Join Date
    09-02-2011
    Location
    Liverpool, england
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: if cell contains chosen text, add value from another cell in same row

    Apologies, posted by mistake in wrong window. Have posted as new thread in general help! Wern't sure how to delete.

    Thanks
    Jason

  8. #8
    Registered User
    Join Date
    04-01-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: if cell contains chosen text, add value from another cell in same row

    building on the origional post...

    if a cell in column C conains "variable", how can I add all the fixed amounts of cell G of the same row for the entire column.

    In other words, everytime O appears in column C, I want to know the sum of the fixed numbers in the same row for the entire column G each time 0 appears in column C

    C G
    0 2
    2 2
    2 2
    0 1

    I'd need the cell to be 3 (2+1 from G2 and G5)

    I have either made this way too hard or way too easy...help!!

  9. #9
    Registered User
    Join Date
    04-01-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: if cell contains chosen text, add value from another cell in same row

    How did you attached the file, I have some problem to do that, could you help?

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: if cell contains chosen text, add value from another cell in same row

    @jrut5422
    @Bonnie2222
    Please read and adhere to these simple rules!

    #2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.
    Ben Van Johnson

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1