+ Reply to Thread
Results 1 to 2 of 2

Getting String from cell and inserting it into a formula

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    Wolverhampton, England
    MS-Off Ver
    2010
    Posts
    1

    Question Getting String from cell and inserting it into a formula

    Hi in Excel I have a column of unique server names, a column of servers and a column of patches applied to servers. It looks something like the picture below.

    First I need to go through each servername in the first column, and count the occurrences of that servername in the second column.

    Then I need to put each servername into a COUNTIFS formula that counts the occurrences of a particular patch per servername - the one on my spreadsheet looks like this:

    =COUNTIFS(A:A,"servername",C:C,"Patch 1")+COUNTIFS(A:A,"servername",C:C,"Patch 2")

    I cannot seem to find a way to make VBA go down a list of undefined length of servernames, putting the servername into the COUNTIFS formula each time? I think I need to get the cell value as a string and insert that string into a formula, but I have no idea how.
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    06-12-2015
    Location
    Maryland, USA
    MS-Off Ver
    2010
    Posts
    83

    Re: Getting String from cell and inserting it into a formula

    see if this is what you want:

    Please Login or Register  to view this content.
    I might be confusing your request but it seems you want to count the number of patch occurences in each unique server. If so should your COUNTIFS be referencing "B:B" instead of "A:A"? Isn't columnA where you keep your unique names?

    Or I might be missing something. See if this helps.
    Got help? Pls give rep.
    If you do R&D learn VBA

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula or Macro, match string,from 1 cell to a column,String use dash
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2013, 06:03 PM
  2. Inserting both a cell's value and a text string in a Chart Text Box
    By amberhasaquestion in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2013, 10:49 AM
  3. [SOLVED] Inserting a formula into a cell using VBA
    By kyleg222 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-17-2012, 09:24 AM
  4. Replies: 4
    Last Post: 02-06-2012, 06:53 PM
  5. Inserting cell outcome into a text string
    By davidjmarsh in forum Excel General
    Replies: 3
    Last Post: 12-21-2011, 09:58 AM

Tags for this Thread

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